Skip to content
Snippets Groups Projects
Commit 814250f0 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- init

parent d0e5c5ae
No related branches found
No related tags found
No related merge requests found
package SLUB::LZA::TA::Command::info;
use SLUB::LZA::TA -command;
use strict;
use warnings;
use feature qw(say);
use SLUB::LZA::TA::Archivematica::Elasticsearch;
# VERSION
# ABSTRACT: search IEs module for ta-tool
sub abstract {"information about Archival Information System (AIS)";}
my $description=<<"DESCR";
Reports information about AIS
DESCR
sub description {
"$description"
}
sub opt_spec {
return (
[ 'help|h', 'print usage message and exit', { shortcircuit => 1 } ],
[ 'target-version|V' => 'get current elasticsearch version', { shortcircuit => 1 } ],
[ 'version|v', 'print version information', { shortcircuit => 1 } ],
);
}
sub validate_args {
my ($self, $opt, $args) = @_;
# no args allowed but options!
$self->usage_error("No args allowed") if @$args;
1;
}
sub execute {
my ($self, $opt, $args) = @_;
if ($opt->{target_version}) {
say SLUB::LZA::TA::Archivematica::Elasticsearch::version_elasticsearch(
$SLUB::LZA::TA::config{elasticsearchprotocol},
$SLUB::LZA::TA::config{elasticsearchhost},
$SLUB::LZA::TA::config{elasticsearchport}
);
}
return 1;
}
1;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment