Add initial versions of test classes
This commit is contained in:
		
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/Bridge.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/Bridge.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::Bridge | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Bridge; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Bridge; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/CiscoAgg.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/CiscoAgg.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::CiscoAgg | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::CiscoAgg; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::CiscoAgg; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/CiscoConfig.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/CiscoConfig.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::CiscoConfig | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::CiscoConfig; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::CiscoConfig; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/CiscoPower.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/CiscoPower.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::CiscoPower | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::CiscoPower; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::CiscoPower; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										36
									
								
								xt/lib/Test/SNMP/Info/CiscoQOS.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								xt/lib/Test/SNMP/Info/CiscoQOS.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| # Test::SNMP::Info::CiscoQOS | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::CiscoQOS; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::CiscoQOS; | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										36
									
								
								xt/lib/Test/SNMP/Info/CiscoRTT.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								xt/lib/Test/SNMP/Info/CiscoRTT.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| # Test::SNMP::Info::CiscoRTT | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::CiscoRTT; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::CiscoRTT; | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/CiscoStpExtensions.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/CiscoStpExtensions.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::CiscoStpExtensions | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::CiscoStpExtensions; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::CiscoStpExtensions; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/Entity.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/Entity.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::Entity | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Entity; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Entity; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										51
									
								
								xt/lib/Test/SNMP/Info/EtherLike.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								xt/lib/Test/SNMP/Info/EtherLike.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | ||||
| # Test::SNMP::Info::EtherLike | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::EtherLike; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::EtherLike; | ||||
|  | ||||
| # No need to override setup in this class as there are no tests needing cached | ||||
| # data | ||||
|  | ||||
| sub munge_el_duplex : Tests(4) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'munge_el_duplex'); | ||||
|   is(SNMP::Info::EtherLike::munge_el_duplex('fullDuplex'), | ||||
|     'full', q(Provided 'fullDuplex' munges to 'full')); | ||||
|   is(SNMP::Info::EtherLike::munge_el_duplex('halfDuplex'), | ||||
|     'half', q(Provided 'halfDuplex' munges to 'half')); | ||||
|   is(SNMP::Info::EtherLike::munge_el_duplex('unknown'), | ||||
|     'unknown', q(Provided 'unknown' remains unchanged)); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										68
									
								
								xt/lib/Test/SNMP/Info/IEEE802dot3ad.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								xt/lib/Test/SNMP/Info/IEEE802dot3ad.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,68 @@ | ||||
| # Test::SNMP::Info::IEEE802dot3ad | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::IEEE802dot3ad; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::IEEE802dot3ad; | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_ad_lag_ports' => 1, | ||||
|     'store'         => { | ||||
|  | ||||
|       # Unpacked 'C0' has first two bits set to 1 all others 0 | ||||
|       # Simple example taken from a 24 port switch to minimize | ||||
|       # unpacked array length | ||||
|       'ad_lag_ports' => {25 => pack("H*", 'C0')} | ||||
|     }, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| sub agg_ports_lag : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'agg_ports_lag'); | ||||
|  | ||||
|   my $expected = {1 => 25, 2 => 25}; | ||||
|  | ||||
|   cmp_deeply($test->{info}->agg_ports_lag(), | ||||
|     $expected, q(Aggregated links have expected values)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   cmp_deeply($test->{info}->agg_ports_lag(), {}, q(No data returns empty hash)); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/IPv6.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/IPv6.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::IPv6 | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::IPv6; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::IPv6; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/LLDP.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/LLDP.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::LLDP | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::LLDP; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::LLDP; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/Layer1.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/Layer1.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::Layer1 | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer1; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer1; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/Layer2.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/Layer2.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::Layer2 | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer2; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer2; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/Layer3.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/Layer3.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::Layer3 | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										94
									
								
								xt/lib/Test/SNMP/Info/Layer3/AlcatelLucent.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								xt/lib/Test/SNMP/Info/Layer3/AlcatelLucent.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,94 @@ | ||||
| # Test::SNMP::Info::Layer3::AlcatelLucent | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::AlcatelLucent; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::AlcatelLucent; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 72, | ||||
|  | ||||
|     # This is made up as no snmpwalk of device | ||||
|     '_description' => '5.1.6.165.R02 Service Release, January 11, 2006.', | ||||
|  | ||||
|     # ALCATEL-IND1-DEVICES::deviceOmniSwitch660248 | ||||
|     '_id'   => '.1.3.6.1.4.1.6486.800.1.1.2.1.3.1.5', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| sub os : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os'); | ||||
|   is($test->{info}->os(), 'AOS', q(OS returns 'AOS')); | ||||
| } | ||||
|  | ||||
| sub vendor : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'vendor'); | ||||
|   is($test->{info}->vendor(), 'alcatel-lucent', q(Vendor returns 'alcatel-lucent')); | ||||
| } | ||||
|  | ||||
| sub model : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'model'); | ||||
|   is($test->{info}->model(), 'OmniSwitch660248', q(Model is expected value)); | ||||
| } | ||||
|  | ||||
| sub os_ver : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os_ver'); | ||||
|   is($test->{info}->os_ver(), '5.1.6.165.R02', q(OS version is expected value)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   is($test->{info}->os_ver(), undef, | ||||
|     q(No description returns undef OS version)); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										99
									
								
								xt/lib/Test/SNMP/Info/Layer3/AlteonAD.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										99
									
								
								xt/lib/Test/SNMP/Info/Layer3/AlteonAD.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,99 @@ | ||||
| # Test::SNMP::Info::Layer3::AlteonAD | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::AlteonAD; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::AlteonAD; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 78, | ||||
|  | ||||
|     # This is made up as no snmpwalk of device | ||||
|     '_description' => 'Alteon 184', | ||||
|  | ||||
|     # ALTEON-ROOT-MIB::aceswitch184 | ||||
|     '_id'   => '.1.3.6.1.4.1.1872.1.9', | ||||
|     '_new_sw_ver' => '10.2.3.4', | ||||
|     '_old_sw_ver' => '10.1.1.1', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| sub os : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os'); | ||||
|   is($test->{info}->os(), 'alteon', q(OS returns 'alteon')); | ||||
| } | ||||
|  | ||||
| sub vendor : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'vendor'); | ||||
|   is($test->{info}->vendor(), 'radware', q(Vendor returns 'radware')); | ||||
| } | ||||
|  | ||||
| sub model : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'model'); | ||||
|   is($test->{info}->model(), '184', q(Model is expected value)); | ||||
| } | ||||
|  | ||||
| sub os_ver : Tests(4) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os_ver'); | ||||
|   is($test->{info}->os_ver(), '10.2.3.4', q(New OS version is expected value)); | ||||
|  | ||||
|   $test->{info}{_new_sw_ver} = undef; | ||||
|   is($test->{info}->os_ver(), '10.1.1.1', q(Old OS version is expected value)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   is($test->{info}->os_ver(), undef, | ||||
|     q(No description returns undef OS version)); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										76
									
								
								xt/lib/Test/SNMP/Info/Layer3/Altiga.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										76
									
								
								xt/lib/Test/SNMP/Info/Layer3/Altiga.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,76 @@ | ||||
| # Test::SNMP::Info::Layer3::Altiga | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Altiga; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Altiga; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 4, | ||||
|  | ||||
|     # This is made up as no snmpwalk of device | ||||
|     '_description' => 'My Bogus Altiga Description', | ||||
|  | ||||
|     # ALTIGA-GLOBAL-REG::vpnConcentratorRev2 | ||||
|     '_id'   => '.1.3.6.1.4.1.3076.1.2.1.1.1.2', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| sub os : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os'); | ||||
|   is($test->{info}->os(), 'altiga', q(OS returns 'altiga')); | ||||
| } | ||||
|  | ||||
| sub vendor : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'vendor'); | ||||
|   is($test->{info}->vendor(), 'altiga', q(Vendor returns 'altiga')); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										99
									
								
								xt/lib/Test/SNMP/Info/Layer3/Aruba.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										99
									
								
								xt/lib/Test/SNMP/Info/Layer3/Aruba.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,99 @@ | ||||
| # Test::SNMP::Info::Layer3::Aruba | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Aruba; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Aruba; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 72, | ||||
|     '_description' => 'ArubaOS (MODEL: Aruba7210-US), Version 6.5.3.5 (65355)', | ||||
|  | ||||
|     # ARUBA-MIB::a7210 | ||||
|     '_id'   => '.1.3.6.1.4.1.14823.1.1.32', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| sub layers : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'layers'); | ||||
|   is($test->{info}->layers(), '00000111', q(Layers returns '00000111')); | ||||
| } | ||||
|  | ||||
| sub os : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os'); | ||||
|   is($test->{info}->os(), 'airos', q(OS returns 'airos')); | ||||
| } | ||||
|  | ||||
| sub vendor : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'vendor'); | ||||
|   is($test->{info}->vendor(), 'aruba', q(Vendor returns 'aruba')); | ||||
| } | ||||
|  | ||||
| sub model : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'model'); | ||||
|   is($test->{info}->model(), 'a7210', q(Model is expected value)); | ||||
| } | ||||
|  | ||||
| sub os_ver : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os_ver'); | ||||
|   is($test->{info}->os_ver(), '6.5.3.5', q(OS version is expected value)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   is($test->{info}->os_ver(), undef, | ||||
|     q(No description returns undef OS version)); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										98
									
								
								xt/lib/Test/SNMP/Info/Layer3/BayRS.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										98
									
								
								xt/lib/Test/SNMP/Info/Layer3/BayRS.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,98 @@ | ||||
| # Test::SNMP::Info::Layer3::BayRS | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::BayRS; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::BayRS; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 4, | ||||
|  | ||||
|     # This is made up as no snmpwalk of device | ||||
|     '_description' => 'Image: rev/15.7.1.0', | ||||
|  | ||||
|     # Wellfleet-COMMON-MIB::wfHwBln | ||||
|     '_id'   => '.1.3.6.1.4.1.18.3.1.5.16640', | ||||
|     '_bp_id' => 'frerbln', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| sub os : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os'); | ||||
|   is($test->{info}->os(), 'bayrs', q(OS returns 'bayrs')); | ||||
| } | ||||
|  | ||||
| sub vendor : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'vendor'); | ||||
|   is($test->{info}->vendor(), 'avaya', q(Vendor returns 'avaya')); | ||||
| } | ||||
|  | ||||
| sub model : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'model'); | ||||
|   is($test->{info}->model(), 'BLN-2', q(Model is expected value)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   is($test->{info}->model(), undef, q(No description returns undef model)); | ||||
| } | ||||
|  | ||||
| sub os_ver : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os_ver'); | ||||
|   is($test->{info}->os_ver(), '15.7.1.0', q(OS version is expected value)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   is($test->{info}->os_ver(), undef, | ||||
|     q(No description returns undef OS version)); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										87
									
								
								xt/lib/Test/SNMP/Info/Layer3/BlueCoatSG.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								xt/lib/Test/SNMP/Info/Layer3/BlueCoatSG.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,87 @@ | ||||
| # Test::SNMP::Info::Layer3::BlueCoatSG | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::BlueCoatSG; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::BlueCoatSG; | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $d_string = 'Blue Coat SG300 Series, Version: SGOS 5.5.3.31, '; | ||||
|   $d_string .= 'Release id: 51877 Proxy Edition'; | ||||
|   my $cache_data = { | ||||
|     '_layers' => 4, | ||||
|     '_description' => $d_string, | ||||
|  | ||||
|     # BLUECOAT-MIB::sg300 | ||||
|     '_id'   => '.1.3.6.1.4.1.3417.1.1.32', | ||||
|     '_sw_ver' => 'Version: SGOS 5.5.3.31', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| sub os : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os'); | ||||
|   is($test->{info}->os(), 'sgos', q(OS returns 'sgos')); | ||||
| } | ||||
|  | ||||
| sub vendor : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'vendor'); | ||||
|   is($test->{info}->vendor(), 'Blue Coat', q(Vendor returns 'Blue Coat')); | ||||
| } | ||||
|  | ||||
| sub model : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'model'); | ||||
|   is($test->{info}->model(), 'sg300', q(Model is expected value)); | ||||
| } | ||||
|  | ||||
| sub os_ver : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os_ver'); | ||||
|   is($test->{info}->os_ver(), '5.5.3.31', q(OS version is expected value)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   is($test->{info}->os_ver(), '', | ||||
|     q(No data returns empty string)); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										193
									
								
								xt/lib/Test/SNMP/Info/Layer3/C4000.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										193
									
								
								xt/lib/Test/SNMP/Info/Layer3/C4000.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,193 @@ | ||||
| # Test::SNMP::Info::Layer3::C4000 | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::C4000; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::C4000; | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $d_string = 'Cisco IOS Software, IOS-XE Software, '; | ||||
|   $d_string .= 'Catalyst 4500 L3 Switch Software (cat4500e-UNIVERSALK9-M), '; | ||||
|   $d_string .= 'Version 03.09.01.E RELEASE SOFTWARE (fc1)'; | ||||
|   my $cache_data = { | ||||
|     '_layers'      => 6, | ||||
|     '_description' => $d_string, | ||||
|  | ||||
|     # CISCO-PRODUCTS-MIB::cat4xxxVirtualSwitch | ||||
|     '_id'             => '.1.3.6.1.4.1.9.1.1732', | ||||
|     '_fan_state'      => 1, | ||||
|     '_fan_descr'      => 1, | ||||
|         '_mau_index'        => 1, | ||||
|           '_mau_autostat'   => 1, | ||||
|           '_mau_type_admin' => 1, | ||||
|           'store'           => { | ||||
|           'fan_state' => { | ||||
|             101 => 'normal', | ||||
|             102 => 'warning', | ||||
|             103 => 'notPresent', | ||||
|             201 => 'shutdown', | ||||
|             202 => 'critical', | ||||
|             203 => 'notFunctioning' | ||||
|           }, | ||||
|           'fan_descr' => { | ||||
|             101 => 'chassis-1 Chassis Fan Tray 1', | ||||
|             102 => 'chassis-1 Power Supply 1 Fan', | ||||
|             103 => 'chassis-1 Power Supply 2 Fan', | ||||
|             201 => 'chassis-2 Chassis Fan Tray 1', | ||||
|             202 => 'chassis-2 Power Supply 1 Fan', | ||||
|             203 => 'chassis-2 Power Supply 2 Fan' | ||||
|           }, | ||||
|           'mau_index'    => {1.1 => 1, 2.1 => 2, 3.1 => 3, 4.1 => 4, 5.1 => 5}, | ||||
|           'mau_autostat' => { | ||||
|             1.1 => 'enabled', | ||||
|             2.1 => 'disabled', | ||||
|             3.1 => 'disabled', | ||||
|             4.1 => 'disabled', | ||||
|             5.1 => 'disabled' | ||||
|           }, | ||||
|  | ||||
|           # .1.3.6.1.2.1.26.4.15 = IANA-MAU-MIB::dot3MauType100BaseTXHD | ||||
|           # .1.3.6.1.2.1.26.4.16 = IANA-MAU-MIB::dot3MauType100BaseTXFD | ||||
|           # .1.3.6.1.2.1.26.4.35 = IANA-MAU-MIB::dot3MauType10GigBaseLR | ||||
|           'mau_type_admin' => { | ||||
|             1.1 => '.0.0', | ||||
|             2.1 => '.0.0', | ||||
|             3.1 => '.1.3.6.1.2.1.26.4.15', | ||||
|             4.1 => '.1.3.6.1.2.1.26.4.16', | ||||
|             5.1 => '.1.3.6.1.2.1.26.4.35', | ||||
|           }, | ||||
|           }, | ||||
|       }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| sub fan : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'fan'); | ||||
|  | ||||
|   my $expected = 'chassis-1 Chassis Fan Tray 1: normal, '; | ||||
|   $expected .= 'chassis-1 Power Supply 1 Fan: warning, '; | ||||
|   $expected .= 'chassis-1 Power Supply 2 Fan: notPresent, '; | ||||
|   $expected .= 'chassis-2 Chassis Fan Tray 1: shutdown, '; | ||||
|   $expected .= 'chassis-2 Power Supply 1 Fan: critical, '; | ||||
|   $expected .= 'chassis-2 Power Supply 2 Fan: notFunctioning'; | ||||
|   is($test->{info}->fan(), $expected, q(Vendor returns 'cisco')); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   is($test->{info}->fan(), undef, q(No data returns undef)); | ||||
| } | ||||
|  | ||||
| sub i_duplex_admin : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'i_duplex_admin'); | ||||
|  | ||||
|   my $expected | ||||
|     = {1 => 'auto', 2 => 'auto', 3 => 'half', 4 => 'full'}; | ||||
|  | ||||
|   cmp_deeply($test->{info}->i_duplex_admin(), | ||||
|     $expected, q(Interfaces have expected duplex admin values)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   cmp_deeply($test->{info}->i_duplex_admin(), | ||||
|     {}, q(No duplex admin data returns empty hash)); | ||||
| } | ||||
|  | ||||
| sub i_speed_admin : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'i_speed_admin'); | ||||
|  | ||||
|   my $expected = {1 => 'auto', 2 => 'auto', 3 => '100 Mbps', 4 => '100 Mbps', 5 => '10 Gbps'}; | ||||
|  | ||||
|   cmp_deeply($test->{info}->i_speed_admin(), | ||||
|     $expected, q(Interfaces have expected speed admin values)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   cmp_deeply($test->{info}->i_speed_admin(), | ||||
|     {}, q(No speed admin data returns empty hash)); | ||||
| } | ||||
|  | ||||
| sub set_i_speed_admin : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   # Set method uses a partial fetch which ignores the cache and reloads data | ||||
|   # therefore we must use the mocked session. | ||||
|   my $data = { | ||||
|     'MAU-MIB::ifMauDefaultType' => { | ||||
|         1.1 => '.0.0', | ||||
|         2.1 => '.0.0', | ||||
|         3.1 => '.1.3.6.1.2.1.26.4.15', | ||||
|         4.1 => '.1.3.6.1.2.1.26.4.16', | ||||
|         5.1 => '.1.3.6.1.2.1.26.4.35', | ||||
|     }, | ||||
|   }; | ||||
|   $test->{info}{sess}{Data} = $data; | ||||
|   can_ok($test->{info}, 'set_i_speed_admin'); | ||||
|  | ||||
|   is($test->{info}->set_i_speed_admin('100', 3), | ||||
|     1, q(Mock set speed call succeeded)); | ||||
|  | ||||
|   is($test->{info}->set_i_speed_admin('auto-x', 2), | ||||
|     undef, q(Mock set speed call to bad speed 'auto-x' fails)); | ||||
| } | ||||
|  | ||||
| sub set_i_duplex_admin : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   # Set method uses a partial fetch which ignores the cache and reloads data | ||||
|   # therefore we must use the mocked session. | ||||
|   my $data = { | ||||
|     'MAU-MIB::ifMauDefaultType' => { | ||||
|         1.1 => '.0.0', | ||||
|         2.1 => '.0.0', | ||||
|         3.1 => '.1.3.6.1.2.1.26.4.15', | ||||
|         4.1 => '.1.3.6.1.2.1.26.4.16', | ||||
|         5.1 => '.1.3.6.1.2.1.26.4.35', | ||||
|     }, | ||||
|   }; | ||||
|   $test->{info}{sess}{Data} = $data; | ||||
|  | ||||
|   can_ok($test->{info}, 'set_i_duplex_admin'); | ||||
|  | ||||
|   is($test->{info}->set_i_duplex_admin('full', 3), | ||||
|     1, q(Mock set duplex call succeeded)); | ||||
|  | ||||
|   is($test->{info}->set_i_duplex_admin('full-x', 2), | ||||
|     undef, q(Mock set duplex call to bad duplex type 'full-x' fails)); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										267
									
								
								xt/lib/Test/SNMP/Info/Layer3/C6500.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										267
									
								
								xt/lib/Test/SNMP/Info/Layer3/C6500.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,267 @@ | ||||
| # Test::SNMP::Info::Layer3::C6500 | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::C6500; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::C6500; | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $d_string = 'Cisco IOS Software, '; | ||||
|   $d_string .= 's2t54 Software (s2t54-ADVIPSERVICESK9-M), '; | ||||
|   $d_string .= 'Version 15.1(2)SY3, RELEASE SOFTWARE (fc4)'; | ||||
|   my $cache_data = { | ||||
|     '_layers'      => 78, | ||||
|     '_description' => $d_string, | ||||
|  | ||||
|     # CISCO-PRODUCTS-MIB::catalyst65xxVirtualSwitch | ||||
|     '_id'             => '.1.3.6.1.4.1.9.1.896', | ||||
|     '_serial1' => '12345678', | ||||
|     '_serial2' => 'ABC1234D56E', | ||||
|     '_cvsSwitchMode' => 'multiNode', | ||||
|     '_e_serial' => 1, | ||||
|     '_el_duplex'      => 1, | ||||
|     '_p_port'         => 1, | ||||
|     '_p_duplex'       => 1, | ||||
|     '_p_duplex_admin' => 1, | ||||
|     '_p_speed'        => 1, | ||||
|     '_mau_index'      => 1, | ||||
|     '_mau_autostat'   => 1, | ||||
|     '_mau_type_admin' => 1, | ||||
|     'store'           => { | ||||
|       'e_serial' => { 1 => undef, 1000 => 'ABC1234D56F'}, | ||||
|       'el_duplex' => { | ||||
|         '2'  => 'fullDuplex', | ||||
|         '3'  => 'halfDuplex', | ||||
|         '4'  => 'fullDuplex', | ||||
|         '26' => 'fullDuplex' | ||||
|       }, | ||||
|       'p_port' => {'0.1' => 2, '0.2' => 3, '0.3' => 4, '2.1' => 26}, | ||||
|       'p_duplex' => | ||||
|         {'0.1' => 'auto', '0.2' => 'half', '0.3' => 'full', '2.1' => 'auto'}, | ||||
|       'p_duplex_admin' => { | ||||
|         '0.1' => pack("H*", 'E0'), | ||||
|         '0.2' => pack("H*", 'E0'), | ||||
|         '0.3' => pack("H*", 'E0'), | ||||
|         '2.1' => pack("H*", '00'), | ||||
|       }, | ||||
|       'p_speed' => { | ||||
|         '0.1' => 'autoDetect', | ||||
|         '0.2' => 's100000000', | ||||
|         '0.3' => 's100000000', | ||||
|         '2.1' => 'autoDetect', | ||||
|       }, | ||||
|       'mau_index'    => {1.1 => 1, 2.1 => 2, 3.1 => 3, 4.1 => 4, 5.1 => 5}, | ||||
|       'mau_autostat' => { | ||||
|         1.1 => 'enabled', | ||||
|         2.1 => 'disabled', | ||||
|         3.1 => 'disabled', | ||||
|         4.1 => 'disabled', | ||||
|         5.1 => 'disabled' | ||||
|       }, | ||||
|  | ||||
|       # .1.3.6.1.2.1.26.4.15 = IANA-MAU-MIB::dot3MauType100BaseTXHD | ||||
|       # .1.3.6.1.2.1.26.4.16 = IANA-MAU-MIB::dot3MauType100BaseTXFD | ||||
|       # .1.3.6.1.2.1.26.4.35 = IANA-MAU-MIB::dot3MauType10GigBaseLR | ||||
|       'mau_type_admin' => { | ||||
|         1.1 => '.0.0', | ||||
|         2.1 => '.0.0', | ||||
|         3.1 => '.1.3.6.1.2.1.26.4.15', | ||||
|         4.1 => '.1.3.6.1.2.1.26.4.16', | ||||
|         5.1 => '.1.3.6.1.2.1.26.4.35', | ||||
|       }, | ||||
|     }, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| sub vendor : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'vendor'); | ||||
|   is($test->{info}->vendor(), 'cisco', q(Vendor returns 'cisco')); | ||||
| } | ||||
|  | ||||
| sub serial : Tests(5) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'serial'); | ||||
|   is($test->{info}->serial(), '12345678', q(Serial returns 'serial1' first)); | ||||
|  | ||||
|   delete $test->{info}{_serial1}; | ||||
|   is($test->{info}->serial(), 'ABC1234D56E', q(Serial returns 'serial2' next)); | ||||
|  | ||||
|   delete $test->{info}{_serial2}; | ||||
|   is($test->{info}->serial(), 'ABC1234D56F', q(Serial returns first entity next)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   is($test->{info}->serial(), '', q(Serial returns empty string with no data)); | ||||
| } | ||||
|  | ||||
| sub i_duplex : Tests(4) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'i_duplex'); | ||||
|  | ||||
|   my $expected = {2 => 'full', 3 => 'half', 4 => 'full', 26 => 'full'}; | ||||
|  | ||||
|   cmp_deeply($test->{info}->i_duplex(), | ||||
|     $expected, q(Interfaces have expected duplex values using etherlike)); | ||||
|  | ||||
|   delete $test->{info}{_el_duplex}; | ||||
|   delete $test->{info}{store}{el_duplex}; | ||||
|   $expected = {3 => 'half', 4 => 'full', 26 => 'full'}; | ||||
|   cmp_deeply($test->{info}->i_duplex(), | ||||
|     $expected, q(Interfaces have expected duplex values using ciscostack)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   cmp_deeply($test->{info}->i_duplex(), | ||||
|     {}, q(No duplex data returns empty hash)); | ||||
| } | ||||
|  | ||||
| sub i_duplex_admin : Tests(4) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'i_duplex_admin'); | ||||
|  | ||||
|   my $expected = {2 => 'auto', 3 => 'half', 4 => 'full', 26 => 'auto'}; | ||||
|  | ||||
|   cmp_deeply($test->{info}->i_duplex_admin(), | ||||
|     $expected, q(Interfaces have expected duplex admin values using etherlike)); | ||||
|  | ||||
|   delete $test->{info}{_el_duplex}; | ||||
|   delete $test->{info}{store}{el_duplex}; | ||||
|   $expected = {2 => 'auto', 3 => 'half', 4 => 'full', 26 => 'full'}; | ||||
|   cmp_deeply($test->{info}->i_duplex_admin(), | ||||
|     $expected, | ||||
|     q(Interfaces have expected duplex admin values using ciscostack)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   cmp_deeply($test->{info}->i_duplex_admin(), | ||||
|     {}, q(No duplex admin data returns empty hash)); | ||||
| } | ||||
|  | ||||
| sub is_virtual_switch : Tests(4) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'is_virtual_switch'); | ||||
|   is($test->{info}->is_virtual_switch(), 1, q(Multi node returns 1)); | ||||
|  | ||||
|   $test->{info}{_cvsSwitchMode} = 'standalone'; | ||||
|   is($test->{info}->is_virtual_switch(), 0, q(Standalone retuns 0)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   is($test->{info}->is_virtual_switch(), 0, q(No data returns 0)); | ||||
| } | ||||
|  | ||||
| sub set_i_duplex_admin : Tests(5) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   # Set method uses a partial fetch which ignores the cache and reloads data | ||||
|   # therefore we must use the mocked session. | ||||
|   my $data = { | ||||
|     'MAU-MIB::ifMauDefaultType' => { | ||||
|         1.1 => '.0.0', | ||||
|         2.1 => '.0.0', | ||||
|         3.1 => '.1.3.6.1.2.1.26.4.15', | ||||
|         4.1 => '.1.3.6.1.2.1.26.4.16', | ||||
|         5.1 => '.1.3.6.1.2.1.26.4.35', | ||||
|     }, | ||||
|   }; | ||||
|   $test->{info}{sess}{Data} = $data; | ||||
|  | ||||
|   can_ok($test->{info}, 'mau_set_i_duplex_admin'); | ||||
|  | ||||
|   is($test->{info}->mau_set_i_duplex_admin('full', 3), | ||||
|     1, q(VSS mock set duplex call succeeded)); | ||||
|  | ||||
|   is($test->{info}->mau_set_i_duplex_admin('full-x', 2), | ||||
|     undef, q(VSS mock set duplex call to bad duplex type 'full-x' fails)); | ||||
|  | ||||
|   # Test non-VSS | ||||
|   delete $test->{info}{_cvsSwitchMode}; | ||||
|  | ||||
|   # Set method uses a partial fetch which ignores the cache and reloads data | ||||
|   # therefore we must use the mocked session. | ||||
|   $data = { | ||||
|     'EtherLike-MIB::dot3StatsDuplexStatus' => { | ||||
|       '1'  => 'fullDuplex', | ||||
|       '2'  => 'halfDuplex', | ||||
|       '3'  => 'fullDuplex', | ||||
|       '26' => 'fullDuplex' | ||||
|     }, | ||||
|   }; | ||||
|   $test->{info}{sess}{Data} = $data; | ||||
|  | ||||
|   is($test->{info}->set_i_duplex_admin('full', 2), | ||||
|     1, q(Non-VSS mock set duplex call succeeded)); | ||||
|  | ||||
|   is($test->{info}->set_i_duplex_admin('full-x', 2), | ||||
|     0, q(Non-VSS mock set duplex call to bad duplex type 'full-x' fails)); | ||||
| } | ||||
|  | ||||
| sub set_i_speed_admin : Tests(5) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   # Set method uses a partial fetch which ignores the cache and reloads data | ||||
|   # therefore we must use the mocked session. | ||||
|   my $data = { | ||||
|     'MAU-MIB::ifMauDefaultType' => { | ||||
|         1.1 => '.0.0', | ||||
|         2.1 => '.0.0', | ||||
|         3.1 => '.1.3.6.1.2.1.26.4.15', | ||||
|         4.1 => '.1.3.6.1.2.1.26.4.16', | ||||
|         5.1 => '.1.3.6.1.2.1.26.4.35', | ||||
|     }, | ||||
|   }; | ||||
|   $test->{info}{sess}{Data} = $data; | ||||
|   can_ok($test->{info}, 'set_i_speed_admin'); | ||||
|  | ||||
|   is($test->{info}->set_i_speed_admin('100', 3), | ||||
|     1, q(VSS mock set speed call succeeded)); | ||||
|  | ||||
|   is($test->{info}->set_i_speed_admin('auto-x', 2), | ||||
|     undef, q(VSS mock set speed call to bad speed 'auto-x' fails)); | ||||
|  | ||||
|   # Test non-VSS | ||||
|   delete $test->{info}{_cvsSwitchMode}; | ||||
|  | ||||
|   is($test->{info}->set_i_speed_admin('100', 2), | ||||
|     1, q(Non-VSS mock set speed call succeeded)); | ||||
|  | ||||
|   is($test->{info}->set_i_speed_admin('auto-x', 2), | ||||
|     0, q(Non-VSS mock set speed call to bad speed 'auto-x' fails)); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/CiscoASA.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/CiscoASA.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer3::CiscoASA | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::CiscoASA; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::CiscoASA; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 4, | ||||
|     '_description' => 'Cisco Adaptive Security Appliance Version 9.2(1)', | ||||
|  | ||||
|     # CISCO-PRODUCTS-MIB::ciscoASA5505 | ||||
|     '_id'   => '.1.3.6.1.4.1.9.1.745', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/CiscoFWSM.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/CiscoFWSM.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer3::CiscoFWSM | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::CiscoFWSM; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::CiscoFWSM; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 4, | ||||
|     '_description' => 'Cisco Firewall Services Module Version 3.2(10)', | ||||
|  | ||||
|     # CISCO-PRODUCTS-MIB::cat6500FirewallSm | ||||
|     '_id'   => '.1.3.6.1.4.1.9.1.522', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										53
									
								
								xt/lib/Test/SNMP/Info/Layer3/CiscoSwitch.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								xt/lib/Test/SNMP/Info/Layer3/CiscoSwitch.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,53 @@ | ||||
| # Test::SNMP::Info::Layer3::CiscoSwitch | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::CiscoSwitch; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::CiscoSwitch; | ||||
|  | ||||
| # This class is a collection of roles and not meant to instantiated for a | ||||
| # specific device. Don't test device class and no need to setup data | ||||
| sub device_type : Tests(1) { | ||||
|   my $test  = shift; | ||||
|   my $class = $test->class; | ||||
|  | ||||
|   can_ok($test->{info}, 'device_type'); | ||||
|  | ||||
| } | ||||
|  | ||||
| sub cisco_comm_indexing : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok $test->{info}, 'cisco_comm_indexing'; | ||||
|   is($test->{info}->cisco_comm_indexing(), 1, 'Cisco community indexing on'); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/Enterasys.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/Enterasys.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer3::Enterasys | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Enterasys; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Enterasys; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 6, | ||||
|     '_description' => 'Enterasys Networks, Inc. C2G124-48P Rev 04.00.31', | ||||
|  | ||||
|     # ENTERASYS-OIDS-MIB::etsysOidPhyC2G124x48P | ||||
|     '_id'   => '.1.3.6.1.4.1.5624.2.2.287', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/Extreme.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/Extreme.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer3::Extreme | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Extreme; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Extreme; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 79, | ||||
|     '_description' => 'ExtremeXOS version 12.3.4.12 v1234b12-patch1-6 by ', | ||||
|  | ||||
|     # EXTREME-BASE-MIB::summitX450-24x | ||||
|     '_id'   => '.1.3.6.1.4.1.1916.2.65', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										61
									
								
								xt/lib/Test/SNMP/Info/Layer3/F5.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								xt/lib/Test/SNMP/Info/Layer3/F5.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,61 @@ | ||||
| # Test::SNMP::Info::Layer3::F5 | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::F5; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::F5; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 78, | ||||
|     '_description' => | ||||
|       'Linux My.DNS.Name.Domain 2.6.18-164.11.1.el5.1.0.f5app #1 SMP ', | ||||
|  | ||||
|     # F5-BIGIP-SYSTEM-MIB::bigip1600 | ||||
|     '_id'   => '.1.3.6.1.4.1.3375.2.1.3.4.20', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										62
									
								
								xt/lib/Test/SNMP/Info/Layer3/Fortinet.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								xt/lib/Test/SNMP/Info/Layer3/Fortinet.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,62 @@ | ||||
| # Test::SNMP::Info::Layer3::Fortinet | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Fortinet; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Fortinet; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 78, | ||||
|  | ||||
|     # Example snmpwalk had null string in sysDescr.0 | ||||
|     '_description' => '', | ||||
|  | ||||
|     # FORTINET-FORTIGATE-MIB::fgt60D | ||||
|     '_id'   => '.1.3.6.1.4.1.12356.101.1.625', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										63
									
								
								xt/lib/Test/SNMP/Info/Layer3/H3C.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								xt/lib/Test/SNMP/Info/Layer3/H3C.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,63 @@ | ||||
| # Test::SNMP::Info::Layer3::H3C | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::H3C; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::H3C; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $d_string = 'Hangzhou H3C Comware Platform Software, '; | ||||
|   $d_string .= 'Software Version 3.10, '; | ||||
|   $d_string .= 'Release 2107 H3C S3100-52TP-SI '; | ||||
|   my $cache_data = { | ||||
|     '_layers' => 78, | ||||
|     '_description' => $d_string, | ||||
|  | ||||
|     # HH3C-PRODUCT-ID-MIB::hh3c-S3100-52TP-SI | ||||
|     '_id'   => '.1.3.6.1.4.1.25506.1.297', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										64
									
								
								xt/lib/Test/SNMP/Info/Layer3/HP9300.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								xt/lib/Test/SNMP/Info/Layer3/HP9300.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,64 @@ | ||||
| # Test::SNMP::Info::Layer3::HP9300 | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::HP9300; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::HP9300; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $d_string =  'Hewlett-Packard Company Software Version '; | ||||
|   $d_string .= 'J4874A HP ProCurve Routing Switch 9315M, '; | ||||
|   $d_string .= 'Software Version 07.6.04cT53 '; | ||||
|   my $cache_data = { | ||||
|     '_layers' => 6, | ||||
|     '_description' => $d_string, | ||||
|  | ||||
|     # HP-SN-ROOT-MIB::hpSwitch9315 | ||||
|     # Note: This also resolves to HP-ICF-OID::hpSwitchJ4874A | ||||
|     '_id'   => '.1.3.6.1.4.1.11.2.3.7.11.28', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										62
									
								
								xt/lib/Test/SNMP/Info/Layer3/Huawei.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								xt/lib/Test/SNMP/Info/Layer3/Huawei.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,62 @@ | ||||
| # Test::SNMP::Info::Layer3::Huawei | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Huawei; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Huawei; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $d_string =  'Huawei Versatile Routing Platform Software VRP (R) software, '; | ||||
|   $d_string .= 'Version 8.100 (CE6810EI V100R005C10SPC200) '; | ||||
|   my $cache_data = { | ||||
|     '_layers' => 4, | ||||
|     '_description' => $d_string, | ||||
|  | ||||
|     # HUAWEI-MIB::ce6810-48S4Q-EI | ||||
|     '_id'   => '.1.3.6.1.4.1.2011.2.239.12', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/IBMGbTor.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/IBMGbTor.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer3::IBMGbTor | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::IBMGbTor; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::IBMGbTor; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 6, | ||||
|     '_description' => 'IBM Networking Operating System RackSwitch G8264', | ||||
|  | ||||
|     # IBM-GbTOR-G8264-MIB::g8264 | ||||
|     '_id'   => '.1.3.6.1.4.1.26543.1.7.6', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										62
									
								
								xt/lib/Test/SNMP/Info/Layer3/Juniper.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								xt/lib/Test/SNMP/Info/Layer3/Juniper.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,62 @@ | ||||
| # Test::SNMP::Info::Layer3::Juniper | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Juniper; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Juniper; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $d_string = 'Juniper Networks, Inc. ex4200-24t internet router, '; | ||||
|   $d_string .= 'kernel JUNOS 10.4R6.5 '; | ||||
|   my $cache_data = { | ||||
|     '_layers'      => 6, | ||||
|     '_description' => $d_string, | ||||
|  | ||||
|     # JUNIPER-CHASSIS-DEFINES-MIB::jnxProductNameEX4200 | ||||
|     '_id'   => '.1.3.6.1.4.1.2636.1.1.1.2.31', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/Lantronix.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/Lantronix.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer3::Lantronix | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Lantronix; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Lantronix; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 79, | ||||
|     '_description' => 'My Name V5.2.0.0R24 (01234567A8BC)', | ||||
|  | ||||
|     # LANTRONIX-MIB::evo | ||||
|     '_id'   => '.1.3.6.1.4.1.244.1.13', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										63
									
								
								xt/lib/Test/SNMP/Info/Layer3/Microsoft.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								xt/lib/Test/SNMP/Info/Layer3/Microsoft.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,63 @@ | ||||
| # Test::SNMP::Info::Layer3::Microsoft | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Microsoft; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Microsoft; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $d_string | ||||
|     = 'Hardware: Intel64 Family 6 Model 26 Stepping 4 AT/AT COMPATIBLE - '; | ||||
|   $d_string .= 'Software: Windows Version 6.1 (Build 7601 Multiprocessor Free)'; | ||||
|   my $cache_data = { | ||||
|     '_layers'      => 4, | ||||
|     '_description' => $d_string, | ||||
|  | ||||
|     # No MIB to translate sysObjectID | ||||
|     '_id'   => '.1.3.6.1.4.1.311', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										61
									
								
								xt/lib/Test/SNMP/Info/Layer3/Mikrotik.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								xt/lib/Test/SNMP/Info/Layer3/Mikrotik.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,61 @@ | ||||
| # Test::SNMP::Info::Layer3::Mikrotik | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Mikrotik; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Mikrotik; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 78, | ||||
|     '_description' => 'RouterOS CRS125-24G-1S', | ||||
|  | ||||
|     # Examples don't give the actual model in sysObjectID instead it | ||||
|     # resolves to MIKROTIK-MIB::mikrotikExperimentalModule | ||||
|     '_id'   => '.1.3.6.1.4.1.14988.1', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/N1600.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/N1600.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer3::N1600 | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::N1600; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::N1600; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 7, | ||||
|     '_description' => 'Passport-1624G (1.1.0.0)', | ||||
|  | ||||
|     # RAPID-CITY::rcA1624 | ||||
|     '_id'   => '.1.3.6.1.4.1.2272.45', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										61
									
								
								xt/lib/Test/SNMP/Info/Layer3/Netscreen.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								xt/lib/Test/SNMP/Info/Layer3/Netscreen.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,61 @@ | ||||
| # Test::SNMP::Info::Layer3::Netscreen | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Netscreen; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Netscreen; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 72, | ||||
|     '_description' => | ||||
|       'NetScreen-5GT version 5.4.0r3a.0 (SN: 0012034005006789, Firewall+VPN)', | ||||
|  | ||||
|     # NETSCREEN-PRODUCTS-MIB::netscreenNs5GT | ||||
|     '_id'   => '.1.3.6.1.4.1.3224.1.14', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										62
									
								
								xt/lib/Test/SNMP/Info/Layer3/Nexus.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								xt/lib/Test/SNMP/Info/Layer3/Nexus.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,62 @@ | ||||
| # Test::SNMP::Info::Layer3::Nexus | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Nexus; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Nexus; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $d_string = 'Cisco NX-OS(tm) n7000, Software (n7000-s1-dk9), '; | ||||
|   $d_string .= 'Version 6.1(4), RELEASE SOFTWARE '; | ||||
|   my $cache_data = { | ||||
|     '_layers' => 70, | ||||
|     '_description' => $d_string, | ||||
|  | ||||
|     # CISCO-ENTITY-VENDORTYPE-OID-MIB::cevChassisN7Kc7009 | ||||
|     '_id'   => '.1.3.6.1.4.1.9.12.3.1.3.932', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/PaloAlto.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/PaloAlto.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer3::PaloAlto | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::PaloAlto; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::PaloAlto; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 4, | ||||
|     '_description' => 'Palo Alto Networks PA-500 series firewall', | ||||
|  | ||||
|     # PAN-PRODUCTS-MIB::panPA-500 | ||||
|     '_id'   => '.1.3.6.1.4.1.25461.2.3.6', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/Passport.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/Passport.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer3::Passport | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Passport; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Passport; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 6, | ||||
|     '_description' => 'VSP-9012 (3.0.2.0) (GA)', | ||||
|  | ||||
|     # RAPID-CITY::rcVSP9012 | ||||
|     '_id'   => '.1.3.6.1.4.1.2272.201', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										62
									
								
								xt/lib/Test/SNMP/Info/Layer3/Pf.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								xt/lib/Test/SNMP/Info/Layer3/Pf.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,62 @@ | ||||
| # Test::SNMP::Info::Layer3::Pf | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Pf; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Pf; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $d_string = 'pfSense my.dnsname.domain 2.3.4-RELEASE '; | ||||
|   $d_string .= 'pfSense FreeBSD 10.3-RELEASE-p19 amd64'; | ||||
|   my $cache_data = { | ||||
|     '_layers' => 4, | ||||
|     '_description' => $d_string, | ||||
|  | ||||
|     # BEGEMOT-SNMPD-MIB::begemotSnmpdAgentFreeBSD | ||||
|     '_id'   => '.1.3.6.1.4.1.12325.1.1.2.1.1', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										89
									
								
								xt/lib/Test/SNMP/Info/Layer3/Pica8.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										89
									
								
								xt/lib/Test/SNMP/Info/Layer3/Pica8.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,89 @@ | ||||
| # Test::SNMP::Info::Layer3::Pica8 | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Pica8; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Pica8; | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $d_string = 'Pica8 XorPlus Platform Software Software version 2.3.4, '; | ||||
|   $d_string .= 'Release 18103. Hardware model P-3295 Release'; | ||||
|   my $cache_data = { | ||||
|     '_layers' => 4, | ||||
|     '_description' => $d_string, | ||||
|  | ||||
|     # No MIB to resolve, just use enterprise ID | ||||
|     '_id'   => '.1.3.6.1.4.1.35098', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| sub os : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os'); | ||||
|   is($test->{info}->os(), 'XorPlus', q(Vendor returns 'XorPlus')); | ||||
| } | ||||
|  | ||||
| sub vendor : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'vendor'); | ||||
|   is($test->{info}->vendor(), 'Pica8', q(Vendor returns 'Pica8')); | ||||
| } | ||||
|  | ||||
| sub model : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'model'); | ||||
|   is($test->{info}->model(), 'P-3295', q(Model is expected value)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   is($test->{info}->model(), undef, q(No description returns undef model)); | ||||
| } | ||||
|  | ||||
| sub os_ver : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os_ver'); | ||||
|   is($test->{info}->os_ver(), '2.3.4', q(OS version is expected value)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   is($test->{info}->os_ver(), undef, | ||||
|     q(No description returns undef OS version)); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/SonicWALL.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/SonicWALL.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer3::SonicWALL | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::SonicWALL; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::SonicWALL; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 4, | ||||
|     '_description' => 'SonicWALL PRO 2040 Enhanced (SonicOS Enhanced 4.2.0.1-12e)', | ||||
|  | ||||
|     # SONICWALL-SMI::sonicwallFw | ||||
|     '_id'   => '.1.3.6.1.4.1.8741.1', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										61
									
								
								xt/lib/Test/SNMP/Info/Layer3/Steelhead.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								xt/lib/Test/SNMP/Info/Layer3/Steelhead.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,61 @@ | ||||
| # Test::SNMP::Info::Layer3::Steelhead | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Steelhead; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Steelhead; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 78, | ||||
|     '_description' => | ||||
|       'Linux MyName 2.6.32 #1 SMP Tue Sep 10 09:28:20 PDT 2013 x86_64', | ||||
|  | ||||
|     # STEELHEAD-MIB::steelhead | ||||
|     '_id'   => '.1.3.6.1.4.1.17163.1.1', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/Sun.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/Sun.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer3::Sun | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Sun; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Sun; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 72, | ||||
|     '_description' => 'Sun SNMP Agent, Sun-Fire-V250', | ||||
|  | ||||
|     # We don't have MIB so this doesn't resolve, but has Sun enterprise ID | ||||
|     '_id'   => '.1.3.6.1.4.1.42.2.1.1', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										63
									
								
								xt/lib/Test/SNMP/Info/Layer3/Tasman.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								xt/lib/Test/SNMP/Info/Layer3/Tasman.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,63 @@ | ||||
| # Test::SNMP::Info::Layer3::Tasman | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::Tasman; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::Tasman; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $d_string = 'Nortel SR 4134 SNMP Agent,  '; | ||||
|   $d_string .= 'Software Version = 10.2.0.0, Boot Version = 0.0.0.45'; | ||||
|   my $cache_data = { | ||||
|     '_layers' => 4, | ||||
|     '_description' => $d_string, | ||||
|  | ||||
|     # NT-ENTERPRISE-DATA-MIB::ntSecureRouter4134.1 | ||||
|     # Don't know why this had trailing .1 in walk | ||||
|     '_id'   => '.1.3.6.1.4.1.562.73.2.2.5.1.1', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/VMware.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/VMware.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer3::VMware | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::VMware; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::VMware; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 72, | ||||
|     '_description' => 'VMware ESX 4.1.0 build-260247 VMware, Inc. x86_64', | ||||
|  | ||||
|     # VMWARE-PRODUCTS-MIB::vmwESX | ||||
|     '_id'   => '.1.3.6.1.4.1.6876.4.1', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/VyOS.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer3/VyOS.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer3::VyOS | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer3::VyOS; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer3::VyOS; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 4, | ||||
|     '_description' => 'Vyatta VyOS 1.1.3', | ||||
|  | ||||
|     # No MIB to resolve just uses enterprise ID | ||||
|     '_id'   => '.1.3.6.1.4.1.30803', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/Layer7.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/Layer7.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::Layer7 | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer7; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer7; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										96
									
								
								xt/lib/Test/SNMP/Info/Layer7/APC.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										96
									
								
								xt/lib/Test/SNMP/Info/Layer7/APC.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,96 @@ | ||||
| # Test::SNMP::Info::Layer7::APC | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer7::APC; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer7::APC; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers'      => 72, | ||||
|     '_description' => 'APC Web/SNMP Management Card', | ||||
|  | ||||
|     # PowerNet-MIB::dp300E | ||||
|     '_id'          => '.1.3.6.1.4.1.318.1.3.7', | ||||
|     '_pdu_model'   => 'AP7998', | ||||
|     '_mgmt_serial' => '1A0234E01234', | ||||
|     'store'        => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| sub os : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os'); | ||||
|   is($test->{info}->os(), 'aos', q(OS returns 'aos')); | ||||
| } | ||||
|  | ||||
| sub model : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'model'); | ||||
|   is($test->{info}->model(), 'AP7998', q(Model is expected value)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   is($test->{info}->model(), undef, q(No data returns undef model)); | ||||
| } | ||||
|  | ||||
| sub vendor : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'vendor'); | ||||
|   is($test->{info}->vendor(), 'apc', q(Vendor returns 'apc')); | ||||
| } | ||||
|  | ||||
| sub serial : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'serial'); | ||||
|   is( | ||||
|     $test->{info}->serial(), | ||||
|     'UPS: unknown, management card: 1A0234E01234', | ||||
|     q(Serial returns expected value)); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										61
									
								
								xt/lib/Test/SNMP/Info/Layer7/CiscoIPS.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								xt/lib/Test/SNMP/Info/Layer7/CiscoIPS.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,61 @@ | ||||
| # Test::SNMP::Info::Layer7::CiscoIPS | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer7::CiscoIPS; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer7::CiscoIPS; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 72, | ||||
|     '_description' => 'Linux CISCO-IPS 2.4.30-IDS-smp-bigphys #2 SMP ', | ||||
|  | ||||
|     # This doesn't fully resolve, suspect to use this as match in device_type() | ||||
|     # CISCO-SMI::ciscoProducts.1545 | ||||
|     '_id'   => '.1.3.6.1.4.1.9.1.1545', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										77
									
								
								xt/lib/Test/SNMP/Info/Layer7/Gigamon.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								xt/lib/Test/SNMP/Info/Layer7/Gigamon.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,77 @@ | ||||
| # Test::SNMP::Info::Layer7::Gigamon | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer7::Gigamon; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer7::Gigamon; | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers'      => 72, | ||||
|     '_description' => 'Linux MyName 2.6.34-GIGAMONsmp-gvt10 GigaVUE-OS 5.2.00 ', | ||||
|  | ||||
|     # GIGAMON-SNMP-MIB::gigamonProducts.10 | ||||
|     '_id'      => '.1.3.6.1.4.1.26866.3.10', | ||||
|     '_g_model' => 'TA10-Chassis', | ||||
|     'store'    => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| sub vendor : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'vendor'); | ||||
|   is($test->{info}->vendor(), 'gigamon', q(Vendor returns 'gigamon')); | ||||
| } | ||||
|  | ||||
| sub os : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os'); | ||||
|   is($test->{info}->os(), 'gigamon', q(OS returns 'gigamon')); | ||||
| } | ||||
|  | ||||
| sub model : Tests(3) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'model'); | ||||
|   is($test->{info}->model(), 'TA10-Chassis', q(Model is expected value)); | ||||
|  | ||||
|   $test->{info}->clear_cache(); | ||||
|   is($test->{info}->model(), undef, q(No data returns undef model)); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										73
									
								
								xt/lib/Test/SNMP/Info/Layer7/Neoteris.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								xt/lib/Test/SNMP/Info/Layer7/Neoteris.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,73 @@ | ||||
| # Test::SNMP::Info::Layer7::Neoteris | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer7::Neoteris; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer7::Neoteris; | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::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)', | ||||
|  | ||||
|     # JUNIPER-IVE-MIB::iveSA4500 | ||||
|     '_id'   => '.1.3.6.1.4.1.12532.252.5.1', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| sub vendor : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'vendor'); | ||||
|   is($test->{info}->vendor(), 'juniper', q(Vendor returns 'juniper')); | ||||
| } | ||||
|  | ||||
| sub os : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'os'); | ||||
|   is($test->{info}->os(), 'ive', q(OS returns 'ive')); | ||||
| } | ||||
|  | ||||
| sub serial : Tests(2) { | ||||
|   my $test = shift; | ||||
|  | ||||
|   can_ok($test->{info}, 'serial'); | ||||
|   is($test->{info}->serial(), '', q(Serial returns expected value)); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer7/Netscaler.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								xt/lib/Test/SNMP/Info/Layer7/Netscaler.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| # Test::SNMP::Info::Layer7::Netscaler | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::Layer7::Netscaler; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::Layer7::Netscaler; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     '_layers' => 72, | ||||
|     '_description' => 'NetScaler NS9.3: Build 55.6.nc, Date: ', | ||||
|  | ||||
|     # NS-ROOT-MIB::nsRoot - from actual snmpwalk no model | ||||
|     '_id'   => '.1.3.6.1.4.1.5951.1', | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/NortelStack.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/NortelStack.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::NortelStack | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::NortelStack; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::NortelStack; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/PowerEthernet.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/PowerEthernet.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::PowerEthernet | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::PowerEthernet; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::PowerEthernet; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/RapidCity.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/RapidCity.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::RapidCity | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::RapidCity; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::RapidCity; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
							
								
								
									
										55
									
								
								xt/lib/Test/SNMP/Info/SONMP.pm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								xt/lib/Test/SNMP/Info/SONMP.pm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| # Test::SNMP::Info::SONMP | ||||
| # | ||||
| # Copyright (c) 2018 Eric Miller | ||||
| # All rights reserved. | ||||
| # | ||||
| # Redistribution and use in source and binary forms, with or without | ||||
| # modification, are permitted provided that the following conditions are met: | ||||
| # | ||||
| #     * Redistributions of source code must retain the above copyright notice, | ||||
| #       this list of conditions and the following disclaimer. | ||||
| #     * Redistributions in binary form must reproduce the above copyright | ||||
| #       notice, this list of conditions and the following disclaimer in the | ||||
| #       documentation and/or other materials provided with the distribution. | ||||
| #     * Neither the name of the University of California, Santa Cruz nor the | ||||
| #       names of its contributors may be used to endorse or promote products | ||||
| #       derived from this software without specific prior written permission. | ||||
| # | ||||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||||
| # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
| # POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package Test::SNMP::Info::SONMP; | ||||
|  | ||||
| use Test::Class::Most parent => 'My::Test::Class'; | ||||
|  | ||||
| use SNMP::Info::SONMP; | ||||
|  | ||||
| # Remove this startup override once we have full method coverage | ||||
| sub startup : Tests(startup => 1) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::startup(); | ||||
|  | ||||
|   $test->todo_methods(1); | ||||
| } | ||||
|  | ||||
| sub setup : Tests(setup) { | ||||
|   my $test = shift; | ||||
|   $test->SUPER::setup; | ||||
|  | ||||
|   # Start with a common cache that will serve most tests | ||||
|   my $cache_data = { | ||||
|     'store' => {}, | ||||
|   }; | ||||
|   $test->{info}->cache($cache_data); | ||||
| } | ||||
|  | ||||
| 1; | ||||
		Reference in New Issue
	
	Block a user