remove trailing newline from os_ver, fixes netdisco #647 (#364)

* remove trailing newline from os_ver, fixes netdisco #647

* note why the newline is in the test

* also update tests

* typo
This commit is contained in:
nick n
2019-09-26 00:58:16 +02:00
committed by GitHub
parent 631f99f97b
commit f941f432e9
2 changed files with 26 additions and 5 deletions

View File

@@ -48,8 +48,8 @@ $VERSION = '3.68';
%GLOBALS = (
%SNMP::Info::Layer7::GLOBALS,
'os_ver' => 'productVersion',
'cpu' => 'iveCpuUtil',
'pulse_os_ver' => 'productVersion',
'cpu' => 'iveCpuUtil',
);
%FUNCS = ( %SNMP::Info::Layer7::FUNCS, );
@@ -60,6 +60,17 @@ sub vendor {
return 'pulsesecure';
}
sub os_ver {
my $neoteris = shift;
my $p_os_ver = $neoteris->pulse_os_ver();
if (defined $p_os_ver) {
chomp ($p_os_ver);
return $p_os_ver;
}
return '';
}
sub os {
return 'ive';
}
@@ -150,7 +161,7 @@ Returns C<'ive'>.
=item $neoteris->os_ver()
C<productVersion>
C<productVersion> without trailing newline.
=item $neoteris->cpu()