Skip to content

Commit

Permalink
driver/power: Remove check for maximum number of outlets for raritan
Browse files Browse the repository at this point in the history
No need to ensure a maximum number - new models can have more outlets.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
  • Loading branch information
edersondisouza committed Jun 27, 2024
1 parent 4fd7caf commit 11cce1d
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 11cce1d

Please sign in to comment.