enhance purestorage rest api
This commit is contained in:
parent
5f83a73604
commit
74de4fc8ab
|
@ -93,11 +93,10 @@ sub new {
|
|||
bless $self, $class;
|
||||
|
||||
$self->{version} = '1.0';
|
||||
$options{options}->add_options(arguments =>
|
||||
{
|
||||
"filter-name:s" => { name => 'filter_name' },
|
||||
"timezone:s" => { name => 'timezone', default => 'GMT' },
|
||||
});
|
||||
$options{options}->add_options(arguments => {
|
||||
'filter-name:s' => { name => 'filter_name' },
|
||||
'timezone:s' => { name => 'timezone', default => 'GMT' },
|
||||
});
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
@ -151,6 +150,11 @@ sub manage_selection {
|
|||
duration_human => centreon::plugins::misc::change_seconds(value => $completed_time - $created_time),
|
||||
};
|
||||
}
|
||||
|
||||
if (scalar(keys %{$self->{pgroup}}) <= 0) {
|
||||
$self->{output}->add_option_msg(short_msg => "No replication group found.");
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -145,9 +145,9 @@ sub new {
|
|||
|
||||
$self->{version} = '1.0';
|
||||
$options{options}->add_options(arguments => {
|
||||
"filter-name:s" => { name => 'filter_name' },
|
||||
"units:s" => { name => 'units', default => '%' },
|
||||
"free" => { name => 'free' },
|
||||
'filter-name:s' => { name => 'filter_name' },
|
||||
'units:s' => { name => 'units', default => '%' },
|
||||
'free' => { name => 'free' },
|
||||
});
|
||||
|
||||
return $self;
|
||||
|
@ -181,6 +181,11 @@ sub manage_selection {
|
|||
%{$entry},
|
||||
};
|
||||
}
|
||||
|
||||
if (scalar(keys %{$self->{volume}}) <= 0) {
|
||||
$self->{output}->add_option_msg(short_msg => "No volume found.");
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Reference in New Issue