rpm

package
v0.0.0-...-683b059 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package rpm contains an xmlrpc client for the RPM server, which turns power on and off in the test lab. Reviews for this package can be sent to tast-fw-library-reviewers@ (before tast-owners@ review).

Index

Constants

View Source
const (
	RemoteRPMHost  string = "chromeos-rpm-server.mtv.corp.google.com"
	LocalRPMHost   string = "rpm-service"
	DefaultRPMPort int    = 9999
)

Use the RemoteRPMHost if you are outside of the lab, and LocalRPMHost if inside.

Variables

This section is empty.

Functions

This section is empty.

Types

type PowerState

type PowerState string

PowerState is a state to be passed to SetPowerViaPoe or SetPowerViaRPM.

const (
	Off   PowerState = "OFF"
	On    PowerState = "ON"
	Cycle PowerState = "CYCLE"
)

States to be passed to SetPowerViaPoe or SetPowerViaRPM.

type RPM

type RPM struct {
	// contains filtered or unexported fields
}

RPM is the client interface to the remote power management service.

func NewLabRPM

func NewLabRPM(ctx context.Context, pxy *servo.Proxy, dutHostname, powerunitHostname, powerunitOutlet, hydraHostname string) (*RPM, error)

NewLabRPM creates a new RPM object for communicating with a RPM server in the lab. `hydraHostname` is optional, the other params are required.

func (*RPM) Close

func (r *RPM) Close(ctx context.Context) error

Close performs RPM cleanup.

func (*RPM) SetPower

func (r *RPM) SetPower(ctx context.Context, state PowerState) (bool, error)

SetPower sets the power state for a plug managed by RPM. Returns the bool returned by the xml rpc call, or error if the call failed. It is unclear under which situations the api will return false with no error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL