intelamt

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProviderName for the provider AMT implementation
	ProviderName = "IntelAMT"
	// ProviderProtocol for the provider AMT implementation
	ProviderProtocol = "AMT"
)

Variables

View Source
var (
	// Features implemented by the AMT provider
	Features = registrar.Features{
		providers.FeaturePowerSet,
		providers.FeaturePowerState,
		providers.FeatureBootDeviceSet,
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// HostScheme should be either "http" or "https".
	HostScheme string
	// Port is the port number to connect to.
	Port   uint32
	Logger logr.Logger
}

type Conn

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

Conn is a connection to a BMC via Intel AMT

func New

func New(host string, user string, pass string, opts ...Option) *Conn

New creates a new AMT connection

func (*Conn) BootDeviceSet

func (c *Conn) BootDeviceSet(ctx context.Context, bootDevice string, setPersistent, efiBoot bool) (ok bool, err error)

BootDeviceSet sets the next boot device with options

func (*Conn) Close

func (c *Conn) Close() (err error)

Close a connection to a BMC

func (*Conn) Compatible

func (c *Conn) Compatible(ctx context.Context) bool

Compatible tests whether a BMC is compatible with the ipmitool provider

func (*Conn) Name

func (c *Conn) Name() string

Name of the provider

func (*Conn) Open

func (c *Conn) Open(ctx context.Context) (err error)

Open a connection to the BMC via Intel AMT.

func (*Conn) PowerSet

func (c *Conn) PowerSet(ctx context.Context, state string) (ok bool, err error)

PowerSet sets the power state of a BMC machine

func (*Conn) PowerStateGet

func (c *Conn) PowerStateGet(ctx context.Context) (state string, err error)

PowerStateGet gets the power state of a BMC machine

type Option

type Option func(*Config)

Option for setting optional Client values

func WithHostScheme

func WithHostScheme(hostScheme string) Option

func WithLogger

func WithLogger(logger logr.Logger) Option

func WithPort

func WithPort(port uint32) Option

Jump to

Keyboard shortcuts

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