wip cisco tc + hp oneview (#2185)

This commit is contained in:
qgarnier 2020-09-02 13:44:14 +02:00 committed by GitHub
parent 884d876549
commit 19b8c73a24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 3 deletions

View File

@ -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}}) {

View File

@ -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;

View File

@ -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]",

View File

@ -36,7 +36,8 @@ sub set_system {
['disabled', 'OK'],
['critical', 'CRITICAL'],
['warning', 'WARNING'],
['unknown', 'UNKNOWN']
['unknown', 'UNKNOWN'],
['n/a', 'OK']
]
};