+ enhance output for aruba (can manage an error if no ap associated)
This commit is contained in:
parent
b5e0a0b5fe
commit
6ee977033d
|
@ -149,7 +149,7 @@ sub check_options {
|
|||
sub skip_global {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
scalar(keys %{$self->{ap}}) > 1 ? return(0) : return(1);
|
||||
scalar(keys %{$self->{ap}}) == 1 ? return(1) : return(0);
|
||||
}
|
||||
|
||||
sub prefix_ap_output {
|
||||
|
@ -208,7 +208,7 @@ sub manage_selection {
|
|||
my $result3 = $options{snmp}->map_instance(mapping => $mapping3, results => $self->{results}->{ $mapping3->{bsnAPAdminStatus}->{oid} }, instance => $instance);
|
||||
if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
|
||||
$result->{bsnAPName} !~ /$self->{option_results}->{filter_name}/) {
|
||||
$self->{output}->output_add(long_msg => "Skipping '" . $result->{bsnAPName} . "': no matching filter.", debug => 1);
|
||||
$self->{output}->output_add(long_msg => "skipping '" . $result->{bsnAPName} . "': no matching filter.", debug => 1);
|
||||
next;
|
||||
}
|
||||
|
||||
|
@ -220,8 +220,7 @@ sub manage_selection {
|
|||
}
|
||||
|
||||
if (scalar(keys %{$self->{ap}}) <= 0) {
|
||||
$self->{output}->output_add(severity => 'OK',
|
||||
short_msg => 'No AP associated (can be: slave wireless controller or your filter)');
|
||||
$self->{output}->output_add(long_msg => 'no AP associated (can be: slave wireless controller or your filter)');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue