Documentation
¶
Overview ¶
Package rpm wraps xmlrpc communications to rpm service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetPowerState ¶
func SetPowerState(ctx context.Context, req *RPMPowerRequest) error
SetPowerState talks to RPM service via xmltpc to set power state based on a RPMPowerRequest.
func SetPowerStateHTTP ¶
func SetPowerStateHTTP(ctx context.Context, req *RPMPowerRequest) error
SetPowerStateHTTP talks to RPM directly over HTTPS to set power state based on RPMPowerRequest.
Types ¶
type PowerState ¶
type PowerState string
PowerState indicates a state we want to set for a outlet on powerunit.
const ( // Map to ON state on powerunit. PowerStateOn PowerState = "ON" // Map to OFF state on powerunit. PowerStateOff PowerState = "OFF" // CYCLE state will tell RPM server to set a outlet to OFF state and then ON (with necessary interval). PowerStateCycle PowerState = "CYCLE" )
type RPMPowerRequest ¶
type RPMPowerRequest struct { // Hostname of the DUT. Hostname string // Hostname of the RPM power unit, e.g. "chromeos6-row13_14-rack15-rpm2". PowerUnitHostname string // Name to locate a specific outlet from a RPM power unit, e.g. ".A7". PowerunitOutlet string // Hostname of hydra if the power unit is connected via a hydra. HydraHostname string // The expecting new state to set power to. State PowerState // RPMType is the RPM model/protocol for the device Type RPMType }
RPMPowerRequest holds data required from rpm service to perform a state change.
Click to show internal directories.
Click to hide internal directories.