diff --git a/.travis.yml b/.travis.yml index 059660dd..98b3159d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ before_install: - mkdir ~/netdisco-mibs - cd ~/netdisco-mibs install: - - curl -sL https://github.com/netdisco/netdisco-mibs/releases/download/4.014/netdisco-mibs.tar.gz | tar --strip-components=1 -zxf - + - curl -sL https://github.com/netdisco/netdisco-mibs/releases/download/4.016/netdisco-mibs.tar.gz | tar --strip-components=1 -zxf - - cpanm --quiet --notest PkgConfig Test::CChecker Alien::zlib::Static Alien::OpenSSL::Static Alien::SNMP before_script: - 'cd ${TRAVIS_BUILD_DIR}' diff --git a/Changes b/Changes index 902ebc66..e26dea19 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,9 @@ +Version 3.68 (2019-xx-xx) + + [ENHANCEMENTS] + + * use pulsesecure mib in layer7::neoteris instead of juniper-ive + Version 3.67 (2019-04-20) [NEW FEATURES] diff --git a/lib/SNMP/Info.pm b/lib/SNMP/Info.pm index 7d238d3f..2d804569 100644 --- a/lib/SNMP/Info.pm +++ b/lib/SNMP/Info.pm @@ -1079,7 +1079,7 @@ See documentation in L for details. =item SNMP::Info::Layer7::Neoteris -Subclass for Juniper SSL VPN appliances. +Subclass for Pulse Secure / Juniper SSL VPN appliances. See documentation in L for details. diff --git a/lib/SNMP/Info/Layer7.pm b/lib/SNMP/Info/Layer7.pm index 71d02b20..cbd0aa4a 100644 --- a/lib/SNMP/Info/Layer7.pm +++ b/lib/SNMP/Info/Layer7.pm @@ -66,9 +66,6 @@ sub model { my $id = $l7->id(); my $model = &SNMP::translateObj($id); - # Neoteris (Juniper IVE) - $model =~ s/^ive//i; - return $model; } diff --git a/lib/SNMP/Info/Layer7/Neoteris.pm b/lib/SNMP/Info/Layer7/Neoteris.pm index 632ef5d3..15a7e602 100644 --- a/lib/SNMP/Info/Layer7/Neoteris.pm +++ b/lib/SNMP/Info/Layer7/Neoteris.pm @@ -42,8 +42,7 @@ $VERSION = '3.67'; %MIBS = ( %SNMP::Info::Layer7::MIBS, - 'UCD-SNMP-MIB' => 'versionTag', - 'JUNIPER-IVE-MIB' => 'productVersion', + 'PULSESECURE-PSG-MIB' => 'productVersion', ); %GLOBALS = ( @@ -57,7 +56,7 @@ $VERSION = '3.67'; %MUNGE = ( %SNMP::Info::Layer7::MUNGE, ); sub vendor { - return 'juniper'; + return 'pulsesecure'; } sub os { @@ -68,12 +67,23 @@ sub serial { return ''; } +sub model { + my $neoteris = shift; + my $id = $neoteris->id(); + my $model = &SNMP::translateObj($id); + + $model =~ s/^ive//i; + + return $model; +} + 1; __END__ =head1 NAME -SNMP::Info::Layer7::Neoteris - SNMP Interface to Juniper SSL VPN appliances +SNMP::Info::Layer7::Neoteris - SNMP Interface to Pulse +Secure / Juniper SSL VPN appliances =head1 AUTHORS @@ -96,7 +106,7 @@ Eric Miller =head1 DESCRIPTION -Subclass for Juniper SSL VPN appliances +Subclass for Pulse Secure / Juniper SSL VPN appliances =head2 Inherited Classes @@ -110,9 +120,7 @@ Subclass for Juniper SSL VPN appliances =over -=item F - -=item F +=item F =item Inherited Classes' MIBs @@ -128,7 +136,12 @@ These are methods that return scalar value from SNMP =item $neoteris->vendor() -Returns 'juniper'. +Returns 'pulsesecure'. + +=item $neoteris->model() + +Translates $neoteris->id() to it's model name, stripping the leading +'ive'. =item $neoteris->os() diff --git a/xt/lib/Test/SNMP/Info/Layer7/Neoteris.pm b/xt/lib/Test/SNMP/Info/Layer7/Neoteris.pm index b7ddb29e..f48dcc9e 100644 --- a/xt/lib/Test/SNMP/Info/Layer7/Neoteris.pm +++ b/xt/lib/Test/SNMP/Info/Layer7/Neoteris.pm @@ -40,10 +40,10 @@ sub setup : Tests(setup) { # Start with a common cache that will serve most tests my $cache_data = { '_layers' => 72, - '_description' => 'Juniper Networks,Inc,SA-4500,7.1R7 (build 20581)', + '_description' => 'Pulse Secure, LLC,Pulse Connect Secure,PSA-3000,8.2R7.2 (build 55673)', - # JUNIPER-IVE-MIB::iveSA4500 - '_id' => '.1.3.6.1.4.1.12532.252.5.1', + # PULSESECURE-PSG-MIB::ivePSA3000 + '_id' => '.1.3.6.1.4.1.12532.256.2.1', 'store' => {}, }; $test->{info}->cache($cache_data); @@ -53,7 +53,7 @@ sub vendor : Tests(2) { my $test = shift; can_ok($test->{info}, 'vendor'); - is($test->{info}->vendor(), 'juniper', q(Vendor returns 'juniper')); + is($test->{info}->vendor(), 'pulsesecure', q(Vendor returns 'pulsesecure')); } sub os : Tests(2) { @@ -63,6 +63,13 @@ sub os : Tests(2) { is($test->{info}->os(), 'ive', q(OS returns 'ive')); } +sub model : Tests(2) { + my $test = shift; + + can_ok($test->{info}, 'model'); + is($test->{info}->model(), 'PSA3000', q(model returns 'PSA3000')); +} + sub serial : Tests(2) { my $test = shift;