Rename dump command to save (#1770)

environments/ppa-mbqj77/deployments/748^2
Xavier 6 years ago
parent 00852d1a66
commit a09e299b3d
  1. 2
      lemonldap-ng-common/scripts/lemonldap-ng-cli
  2. 4
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm

@ -22,7 +22,7 @@ for ( my $i = 0 ; $i < @ARGV ; $i++ ) {
$action ||= "help";
if ( $action =~ /^(?:[gs]et|(?:add|del)Key|dump)$/ ) {
if ( $action =~ /^(?:[gs]et|(?:add|del)Key|save)$/ ) {
eval { require Lemonldap::NG::Manager::Cli; };
die "Manager libraries not available, aborting ($@)" if ($@);
Lemonldap::NG::Manager::Cli->run(@ARGV);

@ -194,7 +194,7 @@ sub lastCfg {
return $self->jsonResponse('/confs/latest')->{cfgNum};
}
sub dump {
sub save {
my ($self) = @_;
my $conf = $self->jsonResponse( '/confs/latest', 'full=1' );
my $json = JSON->new->indent->canonical;
@ -311,7 +311,7 @@ sub run {
}
$self->cfgNum( $self->lastCfg ) unless ( $self->cfgNum );
my $action = shift;
unless ( $action =~ /^(?:get|set|addKey|delKey|dump)$/ ) {
unless ( $action =~ /^(?:get|set|addKey|delKey|save)$/ ) {
die
"unknown action $action. Only get, set, addKey or delKey are accepted";
}

Loading…
Cancel
Save