Power Distribution Units#
To power-cycle the device-under-test, Stb-tester supports the following network-controlled Power Distribution Units (PDU):
PDU |
Ports |
Rack mount? |
Network connection |
---|---|---|---|
8-24 |
✓ |
Ethernet |
|
8 |
✓ |
Ethernet |
|
8 |
✓ |
Ethernet |
|
8 |
✓ |
Ethernet |
|
6-18 |
✓ |
Ethernet |
|
1-8 |
Ethernet |
||
1 |
WiFi |
Configuration files#
The PDU and outlet to use to power-cycle the device-under-test is configured in
your stbt.conf
configuration file. Specify the type, IP address, outlet and
security credentials of the PDU that is controlling the power to the
device-under-test.
Per-node parameters (such as outlet
or address
) can be overridden in the
Node-specific configuration files for each Stb-tester Node.
For example:
In the example above, the PDU is an ATEN PE6108 with the IP address 192.168.1.123. The device-under-test is connected to outlet 1 of the PDU.
The device_under_test.power_outlet
configuration key is a reference to a
power_outlet
configuration section. The power_outlet
configuration
section must have a type
. The other configuration keys depend on the type
of PDU, but many keys are common to many types of PDU.
This table lists the valid values for the type
key, and which other keys
are valid for each type:
PDU model |
Type |
Valid Keys |
---|---|---|
APC |
|
|
ATEN |
|
|
Aviosys IP Power |
|
|
Kasa |
|
|
PDUeX |
|
|
Rittal |
|
|
Common configuration keys#
Key |
Example |
Description |
---|---|---|
type |
aten |
The type of PDU. See above table for valid values. |
address |
192.168.1.25 |
The hostname or IP address of the PDU. |
outlet |
3 |
The power outlet or port number (typically a number between 1 - 8). |
SNMP configuration keys#
These keys apply to ATEN, Rittal and APC PDUs which are controlled using SNMP.
Key |
Example |
Description |
Default |
---|---|---|---|
community |
public |
Used for SNMP v1 and v2c authentication |
N/A - Mandatory for SNMP v1 and v2c |
username |
johnsmith |
Used for SNMP v3 authentication |
N/A - Mandatory for SNMP v3 |
version |
3 |
The SNMP version to use - either “1”, “2c” or “3” |
“3” if “username” is specified, “2c” if “community” is specified |
auth_passphrase |
passw0rd! |
The authentication passphrase to use for SNMP v3 |
None - password auth won’t be used if this isn’t specified |
auth_protocol |
MD5 |
The authentication protocol used for authenticated SNMPv3 messages. One of “MD5”, “SHA”, “SHA-512”, “SHA-384”, “SHA-256” or “SHA-224” |
“MD5” |
priv_passphrase |
s3cret |
The privacy passphrase to use for SNMP v3 |
None - privacy won’t be used if this isn’t specified |
priv_protocol |
DES |
The privacy protocol used for encrypted SNMPv3 messages. One of “DES” or “AES” |
“DES” |
Network configuration#
The Stb-tester Node must be on the same network as the PDU (or more precisely, the Node must be able to reach the PDU’s network).
Controlling the PDU from Python scripts#
From your Python scripts:
pdu = stbt.pdu()
pdu.power_off()
pdu.power_on()
For more details see the API reference documentation for stbt.pdu.