nebula.cyberpower module¶
-
class
nebula.cyberpower.CyberPowerPdu(host)¶ Bases:
objectClass to query & control a CyberPower PDU via SNMP.
Tested on the PDU15SWHVIEC8FNET. I don’t understand SNMP well enough to have any idea if this would be expected to work on other models.
This class is basically just a piece of copy-pasted pysnmp code and a depository for comments.
Parameters: host (str) – IP address or hostname of the PDU on the network -
outlet_state_oids= {'cancelPendingCommand': 7, 'delayedOff': 5, 'delayedOn': 4, 'delayedReboot': 6, 'immediateOff': 2, 'immediateOn': 1, 'immediateReboot': 3, 'outletIdentify': 8}¶
-
set_outlet_on(outlet, on)¶ Set an outlet on or off
Parameters: - outlet – Which outlet to set the power for (for my model this is in the range 1 through 8)
- on – INVALID ATM True means turn it on, False means turn it off
-
-
exception
nebula.cyberpower.CyberPowerPduException¶ Bases:
Exception