| 1 | # SNMP::Info::Layer2::HPVC - SNMP Interface to HP VirtualConnect Switches | ||
| 2 | # | ||
| 3 | # Copyright (c) 2011 Jeroen van Ingen | ||
| 4 | # | ||
| 5 | # All rights reserved. | ||
| 6 | # | ||
| 7 | # Redistribution and use in source and binary forms, with or without | ||
| 8 | # modification, are permitted provided that the following conditions are met: | ||
| 9 | # | ||
| 10 | # * Redistributions of source code must retain the above copyright notice, | ||
| 11 | # this list of conditions and the following disclaimer. | ||
| 12 | # * Redistributions in binary form must reproduce the above copyright | ||
| 13 | # notice, this list of conditions and the following disclaimer in the | ||
| 14 | # documentation and/or other materials provided with the distribution. | ||
| 15 | # * Neither the name of the University of California, Santa Cruz nor the | ||
| 16 | # names of its contributors may be used to endorse or promote products | ||
| 17 | # derived from this software without specific prior written permission. | ||
| 18 | # | ||
| 19 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| 20 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 21 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 22 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
| 23 | # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| 24 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| 25 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| 26 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| 27 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 28 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 29 | # POSSIBILITY OF SUCH DAMAGE. | ||
| 30 | |||
| 31 | package SNMP::Info::Layer2::HPVC; | ||
| 32 | |||
| 33 | use strict; | ||
| 34 | use warnings; | ||
| 35 | use Exporter; | ||
| 36 | use SNMP::Info::Layer2; | ||
| 37 | |||
| 38 | @SNMP::Info::Layer2::HPVC::ISA | ||
| 39 | = qw/SNMP::Info::Layer2 Exporter/; | ||
| 40 | @SNMP::Info::Layer2::HPVC::EXPORT_OK = qw//; | ||
| 41 | |||
| 42 | our ($VERSION, %GLOBALS, %MIBS, %FUNCS, %MUNGE); | ||
| 43 | |||
| 44 | $VERSION = '3.985003'; | ||
| 45 | |||
| 46 | %MIBS = ( | ||
| 47 | %SNMP::Info::Layer2::MIBS, | ||
| 48 | 'HPVC-MIB' => 'vcDomainName', | ||
| 49 | 'CPQSINFO-MIB' => 'cpqSiSysSerialNum', | ||
| 50 | 'HPVCMODULE-MIB' => 'vcModuleDomainName', | ||
| 51 | ); | ||
| 52 | |||
| 53 | %GLOBALS = ( | ||
| 54 | %SNMP::Info::Layer2::GLOBALS, | ||
| 55 | 'serial1' => 'cpqSiSysSerialNum.0', | ||
| 56 | 'os_ver' => 'cpqHoSWRunningVersion.1', | ||
| 57 | 'os_bin' => 'cpqHoFwVerVersion.1', | ||
| 58 | 'productname' => 'cpqSiProductName.0', | ||
| 59 | ); | ||
| 60 | |||
| 61 | %FUNCS = ( | ||
| 62 | %SNMP::Info::Layer2::FUNCS, | ||
| 63 | ); | ||
| 64 | |||
| 65 | %MUNGE = ( | ||
| 66 | # Inherit all the built in munging | ||
| 67 | %SNMP::Info::Layer2::MUNGE, | ||
| 68 | ); | ||
| 69 | |||
| 70 | # Method Overrides | ||
| 71 | |||
| 72 | sub os { | ||
| 73 | return 'hpvc'; | ||
| 74 | } | ||
| 75 | |||
| 76 | sub vendor { | ||
| 77 | return 'hp'; | ||
| 78 | } | ||
| 79 | |||
| 80 | sub model { | ||
| 81 | my $hp = shift; | ||
| 82 | return $hp->productname(); | ||
| 83 | } | ||
| 84 | |||
| 85 | |||
| 86 | 1; | ||
| 87 | __END__ |