We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ccf7a3f + 11cce1d commit 2b5a67fCopy full SHA for 2b5a67f
labgrid/driver/power/raritan.py
@@ -10,21 +10,16 @@
10
11
12
OID = ".1.3.6.1.4.1.13742.6.4.1.2.1"
13
-NUMBER_OF_OUTLETS = 16
14
15
16
def power_set(host, port, index, value):
17
- assert 1 <= int(index) <= NUMBER_OF_OUTLETS
18
-
19
_snmp = SimpleSNMP(host, 'private', port=port)
20
outlet_control_oid = "{}.2.1.{}".format(OID, index)
21
22
_snmp.set(outlet_control_oid, str(int(value)))
23
24
25
def power_get(host, port, index):
26
27
28
_snmp = SimpleSNMP(host, 'public', port=port)
29
output_status_oid = "{}.3.1.{}".format(OID, index)
30
0 commit comments