mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-04-07 20:35:27 +02:00
Fix #1807
This commit is contained in:
parent
2b1c7160a2
commit
b564fe5db7
@ -182,19 +182,6 @@ sub request_api {
|
||||
sub execute_storages_request {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
my $content = do {
|
||||
local $/ = undef;
|
||||
if (!open my $fh, "<", '/home/qgarnier/clients/plugins/todo/santricity/test-storages.txt') {
|
||||
$self->{output}->add_option_msg(short_msg => "Could not open file $self->{option_results}->{$_} : $!");
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
<$fh>;
|
||||
};
|
||||
eval {
|
||||
$content = JSON::XS->new->utf8->decode($content);
|
||||
};
|
||||
return $content;
|
||||
|
||||
my $storages = $self->request_api(name => 'storages', endpoint => '/storage-systems');
|
||||
return $storages if (!defined($options{endpoint}));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user