logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SNMP::Info::CiscoPower - SNMP Interface to data stored in CISCO-POWER-ETHERNET-EXT-MIB.

Author

       Bill Fenner

Description

       The Info::PowerEthernet class needs a per-device helper function to properly map the "pethPsePortTable"
       to "ifIndex" values.  This class provides that helper, using CISCO-POWER-ETHERNET-EXT-MIB.  It does not
       define any helpers for the extra values that this MIB contains.

       Create or use a device subclass that inherit this class.  Do not use directly.

       For debugging purposes you can call this class directly as you would SNMP::Info

        my $poe = new SNMP::Info::CiscoPower (...);

   InheritedClasses
       none.

       Note that it requires that the device inherits from Info::Entity.

   RequiredMIBsCISCO-POWER-ETHERNET-EXT-MIBCISCO-CDP-MIB

Globals

       none.

Name

       SNMP::Info::CiscoPower - SNMP Interface to data stored in CISCO-POWER-ETHERNET-EXT-MIB.

Synopsis

        # Let SNMP::Info determine the correct subclass for you.
        my $poe = new SNMP::Info(
                                 AutoSpecify => 1,
                                 Debug       => 1,
                                 DestHost    => 'myswitch',
                                 Community   => 'public',
                                 Version     => 2
                               )
           or die "Can't connect to DestHost.\n";

        my $class      = $poe->class();
        print "SNMP::Info determined this device to fall under subclass : $class\n";

Table Methods

       These are methods that return tables of information in the form of a reference to a hash.

   PowerPortTable
       $poe->peth_port_ifindex()
           Maps the "pethPsePortTable" to "ifIndex" by way of the ENTITY-MIB.

       $poe->peth_port_power()
           Power supplied by PoE ports, in milliwatts ("cpeExtPsePortPwrConsumption")

   CDPPorttable
       $poe->peth_port_neg_power()
           Power negotiated using CDP, in milliwatts ("cdpCachePowerConsumption")

perl v5.40.0                                       2024-11-09                        SNMP::Info::CiscoPower(3pm)

See Also