wip cisco tc + hp oneview (#2185)
This commit is contained in:
parent
884d876549
commit
19b8c73a24
|
@ -204,6 +204,16 @@ sub manage_selection {
|
|||
$self->{channels}->{$_} = { display => $_ };
|
||||
}
|
||||
|
||||
if (!defined($result->{version}) || $result->{version} !~ /^(?:CE|TC)(\d+\.\d+)/i) {
|
||||
$self->{output}->add_option_msg(short_msg => 'cannot find firmware version');
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
my ($version_major, $version_minor) = split(/\./, $1);
|
||||
if (($version_major < 8) || ($version_major == 8 && $version_minor < 3)) {
|
||||
$self->{output}->add_option_msg(short_msg => 'firmware version is too old (' . $version_major . '.' . $version_minor . ')');
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
|
||||
return if (!defined($result->{MediaChannels}->{Call}));
|
||||
|
||||
foreach my $call (@{$result->{MediaChannels}->{Call}}) {
|
||||
|
|
|
@ -122,7 +122,7 @@ sub execute_custom {
|
|||
my $system_version = 'unknown';
|
||||
$system_version = $self->{results}->{version} if (defined($self->{results}->{version}));
|
||||
|
||||
$self->{output}->output_add(long_msg => 'system version: ' . $system_version);
|
||||
$self->{output}->output_add(long_msg => 'firmware version: ' . $system_version);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -37,7 +37,7 @@ sub check_subpart {
|
|||
|
||||
next if ($self->check_filter(section => 'enclosure.' . $options{section}, instance => $instance));
|
||||
|
||||
my $status = $_->{status};
|
||||
my $status = defined($_->{status}) ? $_->{status} : 'n/a';
|
||||
$self->{output}->output_add(
|
||||
long_msg => sprintf(
|
||||
"enclosure %s '%s' status is '%s' [instance = %s]",
|
||||
|
|
|
@ -36,7 +36,8 @@ sub set_system {
|
|||
['disabled', 'OK'],
|
||||
['critical', 'CRITICAL'],
|
||||
['warning', 'WARNING'],
|
||||
['unknown', 'UNKNOWN']
|
||||
['unknown', 'UNKNOWN'],
|
||||
['n/a', 'OK']
|
||||
]
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue