fix(netapp/ontap/snmp): volumeoptions mode - unitialized value (#3220)

This commit is contained in:
qgarnier 2021-10-27 11:14:42 +02:00 committed by GitHub
parent 595bc1e6cc
commit 6516e314b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -144,7 +144,6 @@ sub manage_selection {
next;
}
$self->{volumes}->{$instance} = {
display => $name
};
@ -165,10 +164,10 @@ sub manage_selection {
my $result = $options{snmp}->map_instance(mapping => $mapping2, results => $snmp_result, instance => $_);
if (defined($self->{option_results}->{filter_status}) && $self->{option_results}->{filter_status} ne '' &&
$result->{status} !~ /$self->{option_results}->{filter_status}/) {
$self->{output}->output_add(long_msg => "skipping '" . $self->{volumes}->{$_}->{name} . "': no matching filter.", debug => 1);
$self->{output}->output_add(long_msg => "skipping '" . $self->{volumes}->{$_}->{display} . "': no matching filter.", debug => 1);
next;
}
$self->{volumes}->{$_}->{status} = $result->{status};
$self->{volumes}->{$_}->{options} = $result->{options};
}