Skip to content

Commit

Permalink
Merge pull request #1435 from edersondisouza/raritan-no-max-outlets
Browse files Browse the repository at this point in the history
driver/power: Remove check for maximum number of outlets for raritan
  • Loading branch information
Bastian-Krause committed Jul 3, 2024
2 parents ccf7a3f + 11cce1d commit 2b5a67f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions labgrid/driver/power/raritan.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,16 @@


OID = ".1.3.6.1.4.1.13742.6.4.1.2.1"
NUMBER_OF_OUTLETS = 16


def power_set(host, port, index, value):
assert 1 <= int(index) <= NUMBER_OF_OUTLETS

_snmp = SimpleSNMP(host, 'private', port=port)
outlet_control_oid = "{}.2.1.{}".format(OID, index)

_snmp.set(outlet_control_oid, str(int(value)))


def power_get(host, port, index):
assert 1 <= int(index) <= NUMBER_OF_OUTLETS

_snmp = SimpleSNMP(host, 'public', port=port)
output_status_oid = "{}.3.1.{}".format(OID, index)

Expand Down

0 comments on commit 2b5a67f

Please sign in to comment.