fix(netapp/ontap/snmp): quotas mode - change message if no quota (#3329)

This commit is contained in:
qgarnier 2021-12-21 09:35:45 +01:00 committed by GitHub
parent a8b6ea80d7
commit a5139dd79b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -361,6 +361,11 @@ sub manage_selection {
my $multi = 1;
$multi = 1024 unless defined($self->{option_results}->{not_kbytes});
if (scalar(keys %{$self->{quotas}}) <= 0) {
$self->{output}->add_option_msg(short_msg => 'No quota found');
$self->{output}->option_exit();
}
$options{snmp}->load(
oids => [ map($_->{oid}, values(%$mapping_datas)) ],
instances => [ map($_, keys(%{$self->{quotas}})) ],
@ -380,11 +385,6 @@ sub manage_selection {
}
$self->{quotas}->{$instance}->{soft_limit} = $soft_limit;
}
if (scalar(keys %{$self->{quotas}}) <= 0) {
$self->{output}->add_option_msg(short_msg => "No quota found");
$self->{output}->option_exit();
}
}
1;