pbnj

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PbnjGrpcAuth = client.PbnjGrpcAuthorityEnv

Variables

This section is empty.

Functions

func NewPowerRequest

func NewPowerRequest(bmcInfo BmcSecretConfig, powerAction v1.PowerAction) *v1.PowerRequest

Types

type BmcSecretConfig

type BmcSecretConfig struct {
	Host     string
	Username string
	Password string
	Vendor   string
}

type BootDevice added in v0.9.0

type BootDevice = v1.BootDevice

Boot devices patched from upstream PBNJ so consumers don't need to depend on the upstream package.

type Pbnj

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

func NewPBNJClient

func NewPBNJClient(pbnjGrpcAuth string) (*Pbnj, error)

NewPBNJClient client establishes a connection with PBnJ which requires "PBNJ_GRPC_AUTHORITY" as an env variables and returns a PBnJClient instance

func (*Pbnj) GetPowerState

func (p *Pbnj) GetPowerState(ctx context.Context, bmcInfo BmcSecretConfig) (PowerState, error)

func (*Pbnj) PowerOff

func (p *Pbnj) PowerOff(ctx context.Context, bmcInfo BmcSecretConfig) error

func (*Pbnj) PowerOn

func (p *Pbnj) PowerOn(ctx context.Context, bmcInfo BmcSecretConfig) error

func (*Pbnj) SetBootDevice added in v0.9.0

func (p *Pbnj) SetBootDevice(ctx context.Context, info BmcSecretConfig, mode BootDevice) error

type PowerState

type PowerState string
const (
	PowerStateOn      PowerState = "on"
	PowerStateOff     PowerState = "off"
	PowerStateUnknown PowerState = "unknown"
)

Jump to

Keyboard shortcuts

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