redfish

package
v0.0.0-...-d9482cb Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boot

type Boot struct {
	CurrentBootMode string `json:"current_boot_mode"`
	PxeInterface    string `json:"pxe_interface"`
}

type CPU

type CPU struct {
	Count        int      `json:"count"`
	Frequency    string   `json:"frequency"`
	Flags        []string `json:"flags"`
	Architecture string   `json:"architecture"`
}

type Data

type Data struct {
	RootDisk      RootDisk  `json:"root_disk"`
	BootInterface string    `json:"boot_interface"`
	Inventory     Inventory `json:"inventory"`
	Logs          string    `json:"logs"`
}

type Default

type Default struct {
	Data *Data
	// contains filtered or unexported fields
}

func (*Default) BootFromImage

func (p *Default) BootFromImage(path string) (err error)

func (*Default) EjectMedia

func (p *Default) EjectMedia() (err error)

func (*Default) GetClientConfig

func (p *Default) GetClientConfig() *gofish.ClientConfig

func (*Default) GetData

func (p *Default) GetData() (*Data, error)

func (*Default) InsertMedia

func (p *Default) InsertMedia(image string) (err error)

func (*Default) Power

func (p *Default) Power(forceOff bool, restart bool) (err error)

func (*Default) WaitPowerStateOn

func (p *Default) WaitPowerStateOn() (err error)

type Dell

type Dell struct {
	Default
}

func (*Dell) GetData

func (d *Dell) GetData() (*Data, error)

type Disk

type Disk struct {
	ID                 string  `json:"-"`
	Rotational         bool    `json:"rotational"`
	Vendor             string  `json:"vendor"`
	Name               string  `json:"name"`
	Hctl               *string `json:"hctl"`
	WwnVendorExtension *string `json:"wwn_vendor_extension"`
	WwnWithExtension   *string `json:"wwn_with_extension"`
	Model              string  `json:"model"`
	Wwn                *string `json:"wwn"`
	Serial             *string `json:"serial"`
	Size               int64   `json:"size"`
}

type Hpe

type Hpe struct {
	Default
}

func (*Hpe) GetData

func (d *Hpe) GetData() (*Data, error)

func (*Hpe) WaitPowerStateOn

func (d *Hpe) WaitPowerStateOn() (err error)

type HpeBaseNetworkAdapter

type HpeBaseNetworkAdapter struct {
	Name           string
	SerialNumber   string
	StructuredName string
	PhysicalPorts  []redfish.EthernetInterface
}

type Interface

type Interface struct {
	Lldp           map[string]string      `json:"lldp"`
	Product        string                 `json:"product"`
	Vendor         *string                `json:"vendor"`
	Name           string                 `json:"name"`
	HasCarrier     bool                   `json:"has_carrier"`
	IP4Address     string                 `json:"ipv4_address"`
	ClientID       *string                `json:"client_id"`
	MacAddress     string                 `json:"mac_address"`
	PortLinkStatus redfish.PortLinkStatus `json:"-"`
	Nic            int                    `json:"-"`
	Port           int                    `json:"-"`
}

type Inventory

type Inventory struct {
	BmcAddress   string       `json:"bmc_address"`
	SystemVendor SystemVendor `json:"system_vendor"`
	Interfaces   []Interface  `json:"interfaces"`
	Boot         Boot         `json:"boot"`
	Disks        []Disk       `json:"disks"`
	Memory       Memory       `json:"memory"`
	CPU          CPU          `json:"cpu"`
}

type Lenovo

type Lenovo struct {
	Default
}

func (*Lenovo) EjectMedia

func (p *Lenovo) EjectMedia() (err error)

func (*Lenovo) GetData

func (d *Lenovo) GetData() (*Data, error)

func (*Lenovo) InsertMedia

func (p *Lenovo) InsertMedia(image string) (err error)

type Memory

type Memory struct {
	PhysicalMb int     `json:"physical_mb"`
	Total      float32 `json:"total"`
}

type Redfish

type Redfish interface {
	GetData() (*Data, error)
	GetClientConfig() *gofish.ClientConfig

	Power(forceOff bool, restart bool) (err error)
	WaitPowerStateOn() (err error)
	BootFromImage(path string) (err error)
	EjectMedia() (err error)
	InsertMedia(image string) (err error)
	// contains filtered or unexported methods
}

func NewDefault

func NewDefault(remoteIP string, cfg config.Config, ctxLogger *log.Entry) (Redfish, error)

func NewDell

func NewDell(remoteIP string, cfg config.Config, ctxLogger *log.Entry) (Redfish, error)

func NewHpe

func NewHpe(remoteIP string, cfg config.Config, ctxLogger *log.Entry) (Redfish, error)

func NewLenovo

func NewLenovo(remoteIP string, cfg config.Config, ctxLogger *log.Entry) (Redfish, error)

type RootDisk

type RootDisk struct {
	Rotational bool   `json:"rotational"`
	Vendor     string `json:"vendor"`
	Name       string `json:"name"`
	Model      string `json:"model"`
	Serial     string `json:"serial"`
	Size       int64  `json:"size"`
}

type SystemVendor

type SystemVendor struct {
	SerialNumber string `json:"serial_number"`
	ProductName  string `json:"product_name"`
	Manufacturer string `json:"manufacturer"`
	Model        string
}

Jump to

Keyboard shortcuts

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