csm

package
v2.20.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidBMCXName

func IsValidBMCXName(xname string) bool

func XnameSliceString

func XnameSliceString(slice []NodeXname) []string

XnameSliceString converts a slice of NodeCollectionType to a slice of strings.

Types

type BMCXname

type BMCXname struct {
	Value string
}

func NewBMCXname

func NewBMCXname(xname string) BMCXname

func (BMCXname) JSONSchema

func (b BMCXname) JSONSchema() *jsonschema.Schema

func (BMCXname) MarshalJSON

func (b BMCXname) MarshalJSON() ([]byte, error)

func (BMCXname) String

func (b BMCXname) String() string

func (*BMCXname) UnmarshalJSON

func (b *BMCXname) UnmarshalJSON(data []byte) error

func (BMCXname) Valid

func (b BMCXname) Valid() (bool, error)

type Component

type Component struct {
	UID                 uuid.UUID        `json:"UID,omitempty" db:"uid"`
	ID                  string           `json:"ID" db:"id" jsonschema:"description=Xname"`
	Type                ComponentType    `json:"Type" db:"type"`
	Subtype             string           `json:"Subtype,omitempty" db:"subtype"`
	Role                ComponentRole    `json:"Role,omitempty" db:"role"`
	SubRole             ComponentSubRole `json:"SubRole,omitempty" db:"sub_role"`
	NetType             ComponentNetType `json:"NetType,omitempty" db:"net_type"`
	Arch                ComponentArch    `json:"Arch,omitempty" db:"arch"`
	Class               ComponentClass   `json:"Class,omitempty" db:"class"`
	State               ComponentState   `json:"State,omitempty" db:"state"`
	Flag                ComponentFlag    `json:"Flag,omitempty" db:"flag"`
	Enabled             bool             `json:"Enabled,omitempty" db:"enabled"`
	SwStatus            string           `json:"SoftwareStatus,omitempty" db:"sw_status"`
	NID                 int              `json:"NID,omitempty" db:"nid"`
	ReservationDisabled bool             `json:"ReservationDisabled,omitempty" db:"reservation_disabled"`
	Locked              bool             `json:"Locked,omitempty" db:"locked"`
}

Component represents a CSM Component

type ComponentArch

type ComponentArch string
const (
	ArchX86     ComponentArch = "X86"
	ArchARM     ComponentArch = "ARM"
	ArchUnknown ComponentArch = "UNKNOWN"
	ArchOther   ComponentArch = "Other"
)

func (ComponentArch) JSONSchema

func (ComponentArch) JSONSchema() *jsonschema.Schema

type ComponentClass

type ComponentClass string
const (
	ClassRiver    ComponentClass = "River"
	ClassMountain ComponentClass = "Mountain"
	ClassHill     ComponentClass = "Hill"
	ClassOther    ComponentClass = "Other"
)

func (ComponentClass) JSONSchema

func (ComponentClass) JSONSchema() *jsonschema.Schema

type ComponentFlag

type ComponentFlag string
const (
	FlagUnknown ComponentFlag = "Unknown"
	FlagOK      ComponentFlag = "OK"      // Functioning properly
	FlagWarning ComponentFlag = "Warning" // Continues to operate, but has an issue that may require attention.
	FlagAlert   ComponentFlag = "Alert"   // No longer operating as expected.  The state may also have changed due to error.
	FlagLocked  ComponentFlag = "Locked"  // Another service has reserved this component.
)

Valid flag values.

func (ComponentFlag) JSONSchema

func (ComponentFlag) JSONSchema() *jsonschema.Schema

type ComponentNetType

type ComponentNetType string
const (
	NetSling      ComponentNetType = "Sling"
	NetInfiniband ComponentNetType = "Infiniband"
	NetEthernet   ComponentNetType = "Ethernet"
	NetOEM        ComponentNetType = "OEM" // Placeholder for non-slingshot
	NetNone       ComponentNetType = "None"
)

func (ComponentNetType) JSONSchema

func (ComponentNetType) JSONSchema() *jsonschema.Schema

type ComponentRole

type ComponentRole string
const (
	RoleCompute     ComponentRole = "Compute"
	RoleService     ComponentRole = "Service"
	RoleSystem      ComponentRole = "System"
	RoleApplication ComponentRole = "Application"
	RoleStorage     ComponentRole = "Storage"
	RoleManagement  ComponentRole = "Management"
)

Valid role values.

func (ComponentRole) JSONSchema

func (ComponentRole) JSONSchema() *jsonschema.Schema

type ComponentState

type ComponentState string

ComponentState represents the state of an CSM component

const (
	StateUnknown   ComponentState = "Unknown"   // The State is unknown.  Appears missing but has not been confirmed as empty.
	StateEmpty     ComponentState = "Empty"     // The location is not populated with a component
	StatePopulated ComponentState = "Populated" // Present (not empty), but no further track can or is being done.
	StateOff       ComponentState = "Off"       // Present but powered off
	StateOn        ComponentState = "On"        // Powered on.  If no heartbeat mechanism is available, its software state may be unknown.

	StateStandby ComponentState = "Standby" // No longer Ready and presumed dead.  It typically means HB has been lost (w/alert).
	StateHalt    ComponentState = "Halt"    // No longer Ready and halted.  OS has been gracefully shutdown or panicked (w/ alert).
	StateReady   ComponentState = "Ready"   // Both On and Ready to provide its expected services, i.e. used for jobs.
)

func (ComponentState) JSONSchema

func (ComponentState) JSONSchema() *jsonschema.Schema

type ComponentSubRole

type ComponentSubRole string
const (
	SubRoleMaster  ComponentSubRole = "Master"
	SubRoleWorker  ComponentSubRole = "Worker"
	SubRoleStorage ComponentSubRole = "Storage"
)

Valid SubRole values.

func (ComponentSubRole) JSONSchema

func (ComponentSubRole) JSONSchema() *jsonschema.Schema

type ComponentType

type ComponentType string
const (
	TypeCDU                      ComponentType = "CDU"
	TypeCabinetCDU               ComponentType = "CabinetCDU"
	TypeCabinetPDU               ComponentType = "CabinetPDU"
	TypeCabinetPDUOutlet         ComponentType = "CabinetPDUOutlet"
	TypeCabinetPDUPowerConnector ComponentType = "CabinetPDUPowerConnector"
	TypeCabinetPDUController     ComponentType = "CabinetPDUController"
	TypeCabinet                  ComponentType = "Cabinet"
	TypeChassis                  ComponentType = "Chassis"
	TypeChassisBMC               ComponentType = "ChassisBMC"
	TypeCMMRectifier             ComponentType = "CMMRectifier"
	TypeCMMFpga                  ComponentType = "CMMFpga"
	TypeCEC                      ComponentType = "CEC"
	TypeComputeModule            ComponentType = "ComputeModule"
	TypeRouterModule             ComponentType = "RouterModule"
	TypeNodeBMC                  ComponentType = "NodeBMC"
	TypeNodeEnclosure            ComponentType = "NodeEnclosure"
	TypeNodeEnclosurePowerSupply ComponentType = "NodeEnclosurePowerSupply"
	TypeHSNBoard                 ComponentType = "HSNBoard"
	TypeMgmtSwitch               ComponentType = "MgmtSwitch"
	TypeMgmtHLSwitch             ComponentType = "MgmtHLSwitch"
	TypeCDUMgmtSwitch            ComponentType = "CDUMgmtSwitch"
	TypeNode                     ComponentType = "Node"
	TypeVirtualNode              ComponentType = "VirtualNode"
	TypeProcessor                ComponentType = "Processor"
	TypeDrive                    ComponentType = "Drive"
	TypeStorageGroup             ComponentType = "StorageGroup"
	TypeNodeNIC                  ComponentType = "NodeNIC"
	TypeMemory                   ComponentType = "Memory"
	TypeNodeAccel                ComponentType = "NodeAccel"
	TypeNodeAccelRiser           ComponentType = "NodeAccelRiser"
	TypeNodeFpga                 ComponentType = "NodeFpga"
	TypeHSNAsic                  ComponentType = "HSNAsic"
	TypeRouterFpga               ComponentType = "RouterFpga"
	TypeRouterBMC                ComponentType = "RouterBMC"
	TypeHSNLink                  ComponentType = "HSNLink"
	TypeHSNConnector             ComponentType = "HSNConnector"
	TypeINVALID                  ComponentType = "INVALID"
)

func (ComponentType) JSONSchema

func (ComponentType) JSONSchema() *jsonschema.Schema

type DiscoveryInfo

type DiscoveryInfo struct {
	LastAttempt    time.Time `` /* 131-byte string literal not displayed */
	LastStatus     string    `` /* 275-byte string literal not displayed */
	RedfishVersion string    `json:"RedfishVersion,omitempty" jsonschema:"description=Version of Redfish as reported by the RF service root,readOnly=true"`
}

type NodeXname

type NodeXname struct {
	Value string
}

func NewNodeXname

func NewNodeXname(xname string) NodeXname

func (NodeXname) BMCPosition

func (n NodeXname) BMCPosition() (int, error)

func (NodeXname) Cabinet

func (n NodeXname) Cabinet() (int, error)

func (NodeXname) Chassis

func (n NodeXname) Chassis() (int, error)

func (NodeXname) JSONSchema

func (NodeXname) JSONSchema() *jsonschema.Schema

func (NodeXname) MarshalJSON

func (xname NodeXname) MarshalJSON() ([]byte, error)

func (NodeXname) NodePosition

func (n NodeXname) NodePosition() (int, error)

func (NodeXname) Slot

func (n NodeXname) Slot() (int, error)

func (NodeXname) String

func (n NodeXname) String() string

func (*NodeXname) UnmarshalJSON

func (xname *NodeXname) UnmarshalJSON(data []byte) error

func (NodeXname) Valid

func (xname NodeXname) Valid() (bool, error)

type RedfishDiscovery

type RedfishDiscovery struct {
	EntrypointID string          `json:"EntrypointID,omitempty" jsonschema:"description=ID of the entrypoint that was used to discover the endpoint"`
	UID          uuid.UUID       `json:"UID,omitempty" jsonschema:"$ref=#/definitions/UUID.1.0.0"`
	URI          string          `json:"EndpointID,omitempty" jsonschema:"description=ID of the endpoint that was discovered"`
	Attempted    time.Time       `json:"Attempted,omitempty" jsonschema:"description=Time the discovery was started,format=date-time"`
	Completed    time.Time       `json:"Completed,omitempty" jsonschema:"description=Time the discovery was completed,format=date-time"`
	Status       string          `` /* 252-byte string literal not displayed */
	Payload      RedfishEndpoint `json:"Payload,omitempty" jsonschema:"description=The discovered endpoint"`
}

type RedfishEndpoint

type RedfishEndpoint struct {
	ID                 string        `json:"ID" jsonschema:"description=HMS Logical component type e.g. NodeBMC, ChassisBMC.,$ref=#/definitions/HMSType.1.0.0"`
	Type               ComponentType `json:"Type,omitempty"`
	Name               string        `` /* 168-byte string literal not displayed */
	Hostname           string        `` /* 255-byte string literal not displayed */
	Domain             string        `` /* 167-byte string literal not displayed */
	FQDN               string        `` /* 183-byte string literal not displayed */
	Enabled            bool          `` /* 150-byte string literal not displayed */
	URI                string        `json:"URI,omitempty" jsonschema:"description=URI of the Redfish service root"`
	UID                uuid.UUID     `json:"UUID,omitempty" jsonschema:"$ref=#/definitions/UUID.1.0.0"`
	User               string        `json:"User,omitempty" jsonschema:"description=Username to use when interrogating endpoint"`
	Password           string        `` /* 126-byte string literal not displayed */
	UseSSDP            bool          `json:"UseSSDP,omitempty" jsonschema:"description=Whether to use SSDP for discovery if the EP supports it."`
	MacRequired        bool          `` /* 322-byte string literal not displayed */
	MACAddr            string        `` /* 383-byte string literal not displayed */
	IPAddress          string        `` /* 255-byte string literal not displayed */
	RediscoverOnUpdate bool          `json:"RediscoverOnUpdate,omitempty" jsonschema:"description=Trigger a rediscovery when endpoint info is updated."`
	TemplateID         string        `` /* 130-byte string literal not displayed */
	DiscoveryInfo      DiscoveryInfo `` /* 132-byte string literal not displayed */
}

type XNameComponents

type XNameComponents struct {
	Cabinet      int    `json:"cabinet"`
	Chassis      int    `json:"chassis"`
	Slot         int    `json:"slot"`
	BMCPosition  int    `json:"bmc_position"`
	NodePosition int    `json:"node_position"`
	Type         string `json:"type"` // 'n' for node, 'b' for BMC
}

Jump to

Keyboard shortcuts

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