This commit is contained in:
Quentin Garnier 2014-12-12 10:54:30 +01:00
parent a8f59c89c8
commit 249f8b2cf6
7 changed files with 11 additions and 11 deletions

View File

@ -120,7 +120,7 @@ sub disco_show {
# $options{snmp} = snmp object
$self->{snmp} = $options{snmp};
$self->manage_selection();
$self->manage_selection(disco => 1);
foreach my $instance (sort @{$self->{node_id_selected}}) {
my $name = $self->{result_names}->{$oid_ltmNodeAddrStatusName . '.' . $instance};

View File

@ -120,7 +120,7 @@ sub disco_show {
# $options{snmp} = snmp object
$self->{snmp} = $options{snmp};
$self->manage_selection();
$self->manage_selection(disco => 1);
foreach my $instance (sort @{$self->{pool_id_selected}}) {
my $name = $self->{result_names}->{$oid_ltmPoolStatusName . '.' . $instance};

View File

@ -120,7 +120,7 @@ sub disco_show {
# $options{snmp} = snmp object
$self->{snmp} = $options{snmp};
$self->manage_selection();
$self->manage_selection(disco => 1);
foreach my $instance (sort @{$self->{vs_id_selected}}) {
my $name = $self->{result_names}->{$oid_ltmVsStatusName . '.' . $instance};

View File

@ -279,7 +279,7 @@ sub manage_selection {
}
}
if (scalar(keys %{$self->{device_id_selected}}) <= 0) {
if (scalar(keys %{$self->{device_id_selected}}) <= 0 && !defined($options{disco})) {
if (defined($self->{option_results}->{device})) {
$self->{output}->add_option_msg(short_msg => "No device found '" . $self->{option_results}->{device} . "' (or counter values are 0).");
} else {
@ -301,7 +301,7 @@ sub disco_show {
# $options{snmp} = snmp object
$self->{snmp} = $options{snmp};
$self->{hostname} = $self->{snmp}->get_hostname();
$self->manage_selection();
$self->manage_selection(disco => 1);
foreach (sort keys %{$self->{device_id_selected}}) {
$self->{output}->add_disco_entry(name => $self->{results}->{$oid_diskIODevice}->{$oid_diskIODevice . '.' . $_},
deviceid => $_);

View File

@ -166,7 +166,7 @@ sub manage_selection {
}
}
if (scalar(@{$self->{diskpath_id_selected}}) <= 0) {
if (scalar(@{$self->{diskpath_id_selected}}) <= 0 && !defined($options{disco})) {
if (defined($self->{option_results}->{diskpath})) {
$self->{output}->add_option_msg(short_msg => "No disk path found for name '" . $self->{option_results}->{diskpath} . "'.");
} else {
@ -188,7 +188,7 @@ sub disco_show {
# $options{snmp} = snmp object
$self->{snmp} = $options{snmp};
$self->manage_selection();
$self->manage_selection(disco => 1);
my $result = $self->get_additional_information();
foreach (sort @{$self->{diskpath_id_selected}}) {
if (defined($result)) {

View File

@ -210,7 +210,7 @@ sub manage_selection {
}
}
if (scalar(@{$self->{interface_id_selected}}) <= 0) {
if (scalar(@{$self->{interface_id_selected}}) <= 0 && !defined($options{disco})) {
if (defined($self->{option_results}->{interface})) {
$self->{output}->add_option_msg(short_msg => "No interface found for name '" . $self->{option_results}->{interface} . "'.");
} else {
@ -232,7 +232,7 @@ sub disco_show {
# $options{snmp} = snmp object
$self->{snmp} = $options{snmp};
$self->manage_selection();
$self->manage_selection(disco => 1);
my $result = $self->get_additional_information();
foreach (sort @{$self->{interface_id_selected}}) {
my $display_value = $self->get_display_value(id => $_);

View File

@ -224,7 +224,7 @@ sub manage_selection {
}
}
if (scalar(@{$self->{storage_id_selected}}) <= 0) {
if (scalar(@{$self->{storage_id_selected}}) <= 0 && !defined($options{disco})) {
if (defined($self->{option_results}->{storage})) {
$self->{output}->add_option_msg(short_msg => "No storage found for name '" . $self->{option_results}->{storage} . "'.");
} else {
@ -246,7 +246,7 @@ sub disco_show {
# $options{snmp} = snmp object
$self->{snmp} = $options{snmp};
$self->manage_selection();
$self->manage_selection(disco => 1);
my $result = $self->get_additional_information();
foreach (sort @{$self->{storage_id_selected}}) {
my $display_value = $self->get_display_value(id => $_);