virtualbmc

package
v2.4.5 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PowerStatusOn          = PowerStatus("On")
	PowerStatusPoweringOn  = PowerStatus("PoweringOn")
	PowerStatusOff         = PowerStatus("Off")
	PowerStatusPoweringOff = PowerStatus("PoweringOff")
	PowerStatusUnknown     = PowerStatus("Unknown")
)
View Source
const (
	ResetTypeOn               = ResetType("On")
	ResetTypeForceOff         = ResetType("ForceOff")
	ResetTypeForceRestart     = ResetType("ForceRestart")
	ResetTypeGracefulShutdown = ResetType("GracefulShutdown")
	ResetTypePushPowerButton  = ResetType("PushPowerButton")
	ResetTypeNmi              = ResetType("Nmi")
)
View Source
const (
	RmcpClassAsf  = 0x06
	RmcpClassIpmi = 0x07
	RmcpClassOem  = 0x08
)
View Source
const (
	RmcpVersion1 = 0x06
)

Variables

This section is empty.

Functions

func StartIPMIServer

func StartIPMIServer(ctx context.Context, conn net.PacketConn, machine Machine) error

StartIPMIServer starts an ipmi server that handles RMCP requests

func StartRedfishServer

func StartRedfishServer(ctx context.Context, listener net.Listener, machine Machine) error

StartRedfishServer starts a redfish server

Types

type Boot

type Boot struct {
	BootOptions                                    OdataID  `json:"BootOptions"`
	BootOrder                                      []string `json:"BootOrder"`
	BootOrderOdataCount                            int      `json:"BootOrder@odata.count"`
	BootSourceOverrideEnabled                      string   `json:"BootSourceOverrideEnabled"`
	BootSourceOverrideMode                         string   `json:"BootSourceOverrideMode"`
	BootSourceOverrideTarget                       string   `json:"BootSourceOverrideTarget"`
	BootSourceOverrideTargetRedfishAllowableValues []string `json:"BootSourceOverrideTarget@Redfish.AllowableValues"`
	UefiTargetBootSourceOverride                   string   `json:"UefiTargetBootSourceOverride"`
}

Boot represents ComputerSystem resource's Boot field

type Chassis

type Chassis struct {
	OdataContext     string           `json:"@odata.context"`
	OdataID          string           `json:"@odata.id"`
	OdataType        string           `json:"@odata.type"`
	Actions          ChassisActions   `json:"Actions"`
	Assembly         OdataID          `json:"Assembly"`
	AssetTag         interface{}      `json:"AssetTag"`
	ChassisType      string           `json:"ChassisType"`
	Description      string           `json:"Description"`
	ID               string           `json:"Id"`
	IndicatorLED     string           `json:"IndicatorLED"`
	Links            ChassisLinks     `json:"Links"`
	Location         Location         `json:"Location"`
	Manufacturer     string           `json:"Manufacturer"`
	Model            string           `json:"Model"`
	Name             string           `json:"Name"`
	NetworkAdapters  OdataID          `json:"NetworkAdapters"`
	PartNumber       string           `json:"PartNumber"`
	PhysicalSecurity PhysicalSecurity `json:"PhysicalSecurity"`
	Power            OdataID          `json:"Power"`
	PowerState       PowerStatus      `json:"PowerState"`
	SKU              string           `json:"SKU"`
	SerialNumber     string           `json:"SerialNumber"`
	Status           MachineStatus    `json:"Status"`
	Thermal          OdataID          `json:"Thermal"`
}

Chassis represents a Chassis resource

type ChassisActions

type ChassisActions struct {
	ChassisReset ChassisReset `json:"#Chassis.Reset"`
}

ChassisActions represents Chassis's Actions field

type ChassisCollection

type ChassisCollection struct {
	OdataContext      string    `json:"@odata.context"`
	OdataID           string    `json:"@odata.id"`
	OdataType         string    `json:"@odata.type"`
	Description       string    `json:"Description"`
	Members           []OdataID `json:"Members"`
	MembersOdataCount int       `json:"Members@odata.count"`
	Name              string    `json:"Name"`
}

ChassisCollection represents the collection of Chassis resource instances

type ChassisLinks struct {
	ComputerSystems             []OdataID     `json:"ComputerSystems"`
	ComputerSystemsOdataCount   int           `json:"ComputerSystems@odata.count"`
	Contains                    []OdataID     `json:"Contains"`
	ContainsOdataCount          int           `json:"Contains@odata.count"`
	CooledBy                    []OdataID     `json:"CooledBy"`
	CooledByOdataCount          int           `json:"CooledBy@odata.count"`
	Drives                      []interface{} `json:"Drives"`
	DrivesOdataCount            int           `json:"Drives@odata.count"`
	ManagedBy                   []OdataID     `json:"ManagedBy"`
	ManagedByOdataCount         int           `json:"ManagedBy@odata.count"`
	ManagersInChassis           []OdataID     `json:"ManagersInChassis"`
	ManagersInChassisOdataCount int           `json:"ManagersInChassis@odata.count"`
	PCIeDevices                 []OdataID     `json:"PCIeDevices"`
	PCIeDevicesOdataCount       int           `json:"PCIeDevices@odata.count"`
	PoweredBy                   []OdataID     `json:"PoweredBy"`
	PoweredByOdataCount         int           `json:"PoweredBy@odata.count"`
	Storage                     []OdataID     `json:"Storage"`
	StorageOdataCount           int           `json:"Storage@odata.count"`
}

ChassisLinks represents Chassis's Links field

type ChassisReset

type ChassisReset struct {
	ResetTypeRedfishAllowableValues []ResetType `json:"ResetType@Redfish.AllowableValues"`
	Target                          string      `json:"target"`
}

ChassisReset represents Chassis's ChassisReset field

type ComputerSystem

type ComputerSystem struct {
	OdataContext            string                `json:"@odata.context"`
	OdataID                 string                `json:"@odata.id"`
	OdataType               string                `json:"@odata.type"`
	Actions                 ComputerSystemActions `json:"Actions"`
	AssetTag                string                `json:"AssetTag"`
	Bios                    OdataID               `json:"Bios"`
	BiosVersion             string                `json:"BiosVersion"`
	Boot                    Boot                  `json:"Boot"`
	Description             string                `json:"Description"`
	EthernetInterfaces      OdataID               `json:"EthernetInterfaces"`
	HostName                string                `json:"HostName"`
	HostWatchdogTimer       HostWatchdogTimer     `json:"HostWatchdogTimer"`
	HostingRoles            []interface{}         `json:"HostingRoles"`
	HostingRolesOdataCount  int                   `json:"HostingRoles@odata.count"`
	ID                      string                `json:"Id"`
	IndicatorLED            string                `json:"IndicatorLED"`
	Links                   ComputerSystemLinks   `json:"Links"`
	Manufacturer            string                `json:"Manufacturer"`
	Memory                  OdataID               `json:"Memory"`
	MemorySummary           MemorySummary         `json:"MemorySummary"`
	Model                   string                `json:"Model"`
	Name                    string                `json:"Name"`
	NetworkInterfaces       OdataID               `json:"NetworkInterfaces"`
	Oem                     ComputerSystemOem     `json:"Oem"`
	PCIeDevices             []OdataID             `json:"PCIeDevices"`
	PCIeDevicesOdataCount   int                   `json:"PCIeDevices@odata.count"`
	PCIeFunctions           []OdataID             `json:"PCIeFunctions"`
	PCIeFunctionsOdataCount int                   `json:"PCIeFunctions@odata.count"`
	PartNumber              string                `json:"PartNumber"`
	PowerState              PowerStatus           `json:"PowerState"`
	ProcessorSummary        ProcessorSummary      `json:"ProcessorSummary"`
	Processors              OdataID               `json:"Processors"`
	SKU                     string                `json:"SKU"`
	SecureBoot              OdataID               `json:"SecureBoot"`
	SerialNumber            string                `json:"SerialNumber"`
	SimpleStorage           OdataID               `json:"SimpleStorage"`
	Status                  MachineStatus         `json:"Status"`
	Storage                 OdataID               `json:"Storage"`
	SystemType              string                `json:"SystemType"`
	TrustedModules          []TrustedModule       `json:"TrustedModules"`
	UUID                    string                `json:"UUID"`
}

ComputerSystem represents a ComputerSystem resource

type ComputerSystemActions

type ComputerSystemActions struct {
	ComputerSystemReset ComputerSystemReset `json:"#ComputerSystem.Reset"`
}

ComputerSystemActions represents ComputerSystem resource's Actions field

type ComputerSystemLinks struct {
	Chassis             []OdataID              `json:"Chassis"`
	ChassisOdataCount   int                    `json:"Chassis@odata.count"`
	CooledBy            []OdataID              `json:"CooledBy"`
	CooledByOdataCount  int                    `json:"CooledBy@odata.count"`
	ManagedBy           []OdataID              `json:"ManagedBy"`
	ManagedByOdataCount int                    `json:"ManagedBy@odata.count"`
	Oem                 ComputerSystemLinksOem `json:"Oem"`
	PoweredBy           []OdataID              `json:"PoweredBy"`
	PoweredByOdataCount int                    `json:"PoweredBy@odata.count"`
}

ComputerSystemLinks represents ComputerSystem resource's Links field

type ComputerSystemLinksOem

type ComputerSystemLinksOem struct {
}

ComputerSystemLinksOem represents ComputerSystem resource's Links Oem field

type ComputerSystemOem

type ComputerSystemOem struct {
}

ComputerSystemOem represents ComputerSystem resource's Oem field

type ComputerSystemReset

type ComputerSystemReset struct {
	ResetTypeRedfishAllowableValues []ResetType `json:"ResetType@Redfish.AllowableValues"`
	Target                          string      `json:"target"`
}

ComputerSystemReset represents ComputerSystem resource's Reset field

type Error

type Error struct {
	MessageExtendedInfo []MessageExtendedInfo `json:"@Message.ExtendedInfo"`
	Code                string                `json:"code"`
	Message             string                `json:"message"`
}

Error represents ErrorResponse's Error field

type ErrorResponse

type ErrorResponse struct {
	Error Error `json:"error"`
}

ErrorResponse represents Error response

type ExpandQuery

type ExpandQuery struct {
	ExpandAll bool `json:"ExpandAll"`
	Levels    bool `json:"Levels"`
	Links     bool `json:"Links"`
	MaxLevels int  `json:"MaxLevels"`
	NoLinks   bool `json:"NoLinks"`
}

ExpandQuery represents ServiceRoot's ExpandQuery field

type HostWatchdogTimer

type HostWatchdogTimer struct {
	FunctionEnabled bool   `json:"FunctionEnabled"`
	Status          Status `json:"Status"`
	TimeoutAction   string `json:"TimeoutAction"`
}

HostWatchdogTimer represents ComputerSystem resource's HostWatchdogTimer field

type Location

type Location struct {
	Info          string        `json:"Info"`
	InfoFormat    string        `json:"InfoFormat"`
	Placement     Placemat      `json:"Placement"`
	PostalAddress PostalAddress `json:"PostalAddress"`
}

Location represents Chassis's Location field

type Machine

type Machine interface {
	PowerStatus() (PowerStatus, error)
	PowerOn() error
	PowerOff() error
}

Machine defines the interface to manipulate Machine

type MachineStatus

type MachineStatus struct {
	Health       string `json:"Health"`
	HealthRollup string `json:"HealthRollup"`
	State        string `json:"State"`
}

MachineStatus represents ComputerSystem resource's Status field

type MemorySummary

type MemorySummary struct {
	MemoryMirroring      string        `json:"MemoryMirroring"`
	Status               MachineStatus `json:"Status"`
	TotalSystemMemoryGiB float64       `json:"TotalSystemMemoryGiB"`
}

MemorySummary represents ComputerSystem resource's MemorySummary field

type MessageExtendedInfo

type MessageExtendedInfo struct {
	Message                     string        `json:"Message"`
	MessageArgs                 []string      `json:"MessageArgs"`
	MessageArgsOdataCount       int           `json:"MessageArgs@odata.count"`
	MessageID                   string        `json:"MessageId"`
	RelatedProperties           []interface{} `json:"RelatedProperties"`
	RelatedPropertiesOdataCount int           `json:"RelatedProperties@odata.count"`
	Resolution                  string        `json:"Resolution"`
	Severity                    string        `json:"Severity"`
}

MessageExtendedInfo represents ErrorResponse's MessageExtendedInfo field

type OdataID

type OdataID struct {
	OdataID string `json:"@odata.id"`
}

OdataID represents the unique identifier for a resource

type PhysicalSecurity

type PhysicalSecurity struct {
	IntrusionSensor       string `json:"IntrusionSensor"`
	IntrusionSensorNumber int    `json:"IntrusionSensorNumber"`
	IntrusionSensorReArm  string `json:"IntrusionSensorReArm"`
}

PhysicalSecurity represents Chassis's PhysicalSecurity field

type Placemat

type Placemat struct {
	Rack string `json:"Rack"`
	Row  string `json:"Row"`
}

Placemat represents Chassis's Placemat field

type PostalAddress

type PostalAddress struct {
	Building string `json:"Building"`
	Room     string `json:"Room"`
}

PostalAddress represents Chassis's PostalAddress field

type PowerStatus

type PowerStatus string

type ProcessorSummary

type ProcessorSummary struct {
	Count                 int           `json:"Count"`
	LogicalProcessorCount int           `json:"LogicalProcessorCount"`
	Model                 string        `json:"Model"`
	Status                MachineStatus `json:"Status"`
}

ProcessorSummary represents ComputerSystem resource's ProcessorSummary field

type ProtocolFeaturesSupported

type ProtocolFeaturesSupported struct {
	ExpandQuery ExpandQuery `json:"ExpandQuery"`
	FilterQuery bool        `json:"FilterQuery"`
	SelectQuery bool        `json:"SelectQuery"`
}

ProtocolFeaturesSupported represents ServiceRoot's ProtocolFeaturesSupported field

type RequestBody

type RequestBody struct {
	ResetType ResetType `json:"ResetType"`
}

RequestBody represents Post request body

type ResetType

type ResetType string

type ResourceCollection

type ResourceCollection struct {
	OdataContext      string    `json:"@odata.context"`
	OdataID           string    `json:"@odata.id"`
	OdataType         string    `json:"@odata.type"`
	Description       string    `json:"Description"`
	Members           []OdataID `json:"Members"`
	MembersOdataCount int       `json:"Members@odata.count"`
	Name              string    `json:"Name"`
}

ResourceCollection represents the collection of resource instances

type ServiceRoot

type ServiceRoot struct {
	OdataContext              string                    `json:"@odata.context"`
	OdataID                   string                    `json:"@odata.id"`
	OdataType                 string                    `json:"@odata.type"`
	AccountService            OdataID                   `json:"AccountService"`
	Chassis                   OdataID                   `json:"Chassis"`
	Description               string                    `json:"Description"`
	EventService              OdataID                   `json:"EventService"`
	Fabrics                   OdataID                   `json:"Fabrics"`
	ID                        string                    `json:"Id"`
	JSONSchemas               OdataID                   `json:"JsonSchemas"`
	Links                     ServiceRootLinks          `json:"Links"`
	Managers                  OdataID                   `json:"Managers"`
	Name                      string                    `json:"Name"`
	Oem                       ServiceRootOem            `json:"Oem"`
	Product                   string                    `json:"Product"`
	ProtocolFeaturesSupported ProtocolFeaturesSupported `json:"ProtocolFeaturesSupported"`
	RedfishVersion            string                    `json:"RedfishVersion"`
	Registries                OdataID                   `json:"Registries"`
	SessionService            OdataID                   `json:"SessionService"`
	Systems                   OdataID                   `json:"Systems"`
	Tasks                     OdataID                   `json:"Tasks"`
	UpdateService             OdataID                   `json:"UpdateService"`
}

ServiceRoot represents Redfish service root(/redfish/v1)

type ServiceRootLinks struct {
	Sessions OdataID `json:"Sessions"`
}

ServiceRootLinks represents ServiceRoot's Links field

type ServiceRootOem

type ServiceRootOem struct {
}

ServiceRootOem represents ServiceRoot's Oem field

type Status

type Status struct {
	State string `json:"State"`
}

Status represents ComputerSystem resource's Status field

type TrustedModule

type TrustedModule struct {
	FirmwareVersion string `json:"FirmwareVersion"`
	InterfaceType   string `json:"InterfaceType"`
	Status          Status `json:"Status"`
}

TrustedModule represents ComputerSystem resource's TrustedModule field

Jump to

Keyboard shortcuts

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