Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1from .snmp import BaseSnmpPDU 

2 

3 

4class ApcMasterswitchPDU(BaseSnmpPDU): 

5 OID_OUTLETS = "SNMPv2-SMI::enterprises.318.1.1.4.4.2.1" 

6 

7 def __init__(self, name, config): 

8 hostname = config.get('hostname') 

9 

10 if hostname is None: 

11 raise ValueError("Config: Missing the 'hostname' parameter") 

12 

13 super().__init__(name, hostname, 

14 oid_outlets_label_base=f"{self.OID_OUTLETS}.4") 

15 

16 def port_oid(self, port_id): 

17 return f"{self.OID_OUTLETS}.3.{port_id}"