Versions in this module Expand all Collapse all v2 v2.20.5 Aug 5, 2026 Changes in this version + const CLProcessingModelFlex + const CLProcessingModelRigid + const CLResultDisabled + const CLResultLocked + const CLResultNotFound + const CLResultReserved + const CLResultServerError + const CLResultSuccess + const CLResultUnlocked + const CompEPTypeChassis + const CompEPTypeManager + const CompEPTypeOutlet + const CompEPTypePDU + const CompEPTypeSystem + const DiscComplete + const DiscInProgress + const DiscNotStarted + const DiscPending + const HWInvByFRUCDUMgmtSwitch + const HWInvByFRUCMMRectifier + const HWInvByFRUCabinet + const HWInvByFRUChassis + const HWInvByFRUComputeModule + const HWInvByFRUDrive + const HWInvByFRUHSNBoard + const HWInvByFRUHSNNIC + const HWInvByFRUMemory + const HWInvByFRUMgmtHLSwitch + const HWInvByFRUMgmtSwitch + const HWInvByFRUNode + const HWInvByFRUNodeAccel + const HWInvByFRUNodeAccelRiser + const HWInvByFRUNodeBMC + const HWInvByFRUNodeEnclosure + const HWInvByFRUNodeEnclosurePowerSupply + const HWInvByFRUOutlet + const HWInvByFRUPDU + const HWInvByFRUProcessor + const HWInvByFRURouterBMC + const HWInvByFRURouterModule + const HWInvByLocCDUMgmtSwitch + const HWInvByLocCMMRectifier + const HWInvByLocCabinet + const HWInvByLocChassis + const HWInvByLocComputeModule + const HWInvByLocDrive + const HWInvByLocHSNBoard + const HWInvByLocHSNNIC + const HWInvByLocMemory + const HWInvByLocMgmtHLSwitch + const HWInvByLocMgmtSwitch + const HWInvByLocNode + const HWInvByLocNodeAccel + const HWInvByLocNodeAccelRiser + const HWInvByLocNodeBMC + const HWInvByLocNodeEnclosure + const HWInvByLocNodeEnclosurePowerSupply + const HWInvByLocOutlet + const HWInvByLocPDU + const HWInvByLocProcessor + const HWInvByLocRouterBMC + const HWInvByLocRouterModule + const HWInvFormatFullyFlat + const HWInvFormatHierarchical + const HWInvFormatNestNodesOnly + const HWInvHistEventTypeAdded + const HWInvHistEventTypeDetected + const HWInvHistEventTypeRemoved + const HWInvHistEventTypeScanned + const JobComplete + const JobError + const JobInProgress + const JobNotStarted + const JobPending + const JobTypeSRFP + var ErrCompEthInterfaceBadCompID = base.NewHMSError("sm", "Invalid CompEthInterface component ID") + var ErrCompEthInterfaceBadIPAddress = base.NewHMSError("sm", "Invalid CompEthInterface IP Address") + var ErrCompEthInterfaceBadMAC = base.NewHMSError("sm", "Invalid CompEthInterface MAC Address") + var ErrCompLockV2BadDuration = base.NewHMSError("sm", "Invalid Reservation Duration") + var ErrCompLockV2BadProcessingModel = base.NewHMSError("sm", "Invalid Processing Model") + var ErrCompLockV2CompDisabled = base.NewHMSError("sm", "Component reservations are disabled") + var ErrCompLockV2CompLocked = base.NewHMSError("sm", "Component is Locked") + var ErrCompLockV2CompReserved = base.NewHMSError("sm", "Component is Reserved") + var ErrCompLockV2CompUnlocked = base.NewHMSError("sm", "Component is Unlocked") + var ErrCompLockV2DKey = base.NewHMSError("sm", "Deputy Key required for operation") + var ErrCompLockV2DupLock = base.NewHMSError("sm", "Component is Locked") + var ErrCompLockV2NotFound = base.NewHMSError("sm", "Component not found") + var ErrCompLockV2RKey = base.NewHMSError("sm", "Reservation Key required for operation") + var ErrCompLockV2Unknown = base.NewHMSError("sm", "Unknown locking error") + var ErrGroupBadField = base.NewHMSError("sm", "group or partition field has invalid characters") + var ErrHWFRUIDInvalid = base.NewHMSError("sm", "FRUID is empty or invalid") + var ErrHWHistEventTypeInvalid = base.NewHMSError("sm", "Invalid hardware inventory history event type") + var ErrHWInvFmtInvalid = base.NewHMSError("sm", "Invalid HW Inventory format") + var ErrHWInvFmtNI = base.NewHMSError("sm", "HW Inv format not yet implemented") + var ErrHWInvHistFmtInvalid = base.NewHMSError("sm", "Invalid HW Inventory History format") + var ErrHWInvMissingFRU = base.NewHMSError("sm", "PopulatedFRU must be populated") + var ErrHWInvMissingFRUInfo = base.NewHMSError("sm", "FRU info is empty") + var ErrHWInvMissingLoc = base.NewHMSError("sm", "Component location info is empty") + var ErrHWLocInvalid = base.NewHMSError("sm", "ID is empty or not a valid xname") + var ErrPartBadName = base.NewHMSError("sm", "Bad partition name. Must be p# or p#.#") + func NormalizeGroupField(f string) string + func SetDebug(level int) + func SetLogger(l *log.Logger) + func SetVerbose(level int) + func VerifyGroupField(f string) error + func VerifyNormalizeHWInvHistEventType(eventType string) string + func VerifyNormalizeProcessingModel(pm string) string + type CompEthInterface struct + CompID string + Desc string + ID string + IPAddr string + LastUpdate string + MACAddr string + Type string + func NewCompEthInterface(desc, macAddr, ipAddr, compID string) (*CompEthInterface, error) + type CompEthInterfacePatch struct + CompID *string + Desc *string + IPAddr *string + type CompEthInterfaceV2 struct + CompID string + Desc string + ID string + IPAddrs []IPAddressMapping + LastUpdate string + MACAddr string + Type string + func NewCompEthInterfaceV2(desc, macAddr, compID string, ipAddrs []IPAddressMapping) (*CompEthInterfaceV2, error) + func (cei *CompEthInterfaceV2) ToV1() *CompEthInterface + type CompEthInterfaceV2Patch struct + CompID *string + Desc *string + IPAddrs *[]IPAddressMapping + type CompLockV2 struct + CreationTime string + ExpirationTime string + ID string + Locked bool + ReservationDisabled bool + Reserved bool + type CompLockV2Count struct + Failure int + Success int + Total int + type CompLockV2DeputyKeyArray struct + DeputyKeys []CompLockV2Key + func (cldk *CompLockV2DeputyKeyArray) VerifyNormalize() error + type CompLockV2Failure struct + ID string + Reason string + type CompLockV2Filter struct + Arch []string + Class []string + Enabled []string + Flag []string + Group []string + ID []string + Locked []string + NID []string + Partition []string + ProcessingModel string + ReservationDisabled []string + ReservationDuration int + Reserved []string + Role []string + State []string + SubRole []string + Subtype []string + SwStatus []string + Type []string + func (cl *CompLockV2Filter) VerifyNormalize() error + type CompLockV2Key struct + ID string + Key string + func (clk *CompLockV2Key) VerifyNormalize() error + type CompLockV2ReservationFilter struct + ProcessingModel string + ReservationDuration int + ReservationKeys []CompLockV2Key + func (clr *CompLockV2ReservationFilter) VerifyNormalize() error + type CompLockV2ReservationResult struct + Failure []CompLockV2Failure + Success []CompLockV2Success + type CompLockV2Status struct + Components []CompLockV2 + NotFound []string + type CompLockV2Success struct + CreationTime string + DeputyKey string + ExpirationTime string + ID string + ReservationKey string + type CompLockV2SuccessArray struct + ComponentIDs []string + type CompLockV2UpdateResult struct + Counts CompLockV2Count + Failure []CompLockV2Failure + Success CompLockV2SuccessArray + type ComponentEndpoint struct + ComponentEndpointType string + Enabled bool + RedfishChassisInfo *rf.ComponentChassisInfo + RedfishManagerInfo *rf.ComponentManagerInfo + RedfishOutletInfo any + RedfishPDUInfo *rf.ComponentPDUInfo + RedfishSystemInfo *rf.ComponentSystemInfo + RfEndpointFQDN string + URL string + func (cep *ComponentEndpoint) DecodeComponentInfo(infoJSON []byte) error + func (cep *ComponentEndpoint) EncodeComponentInfo() ([]byte, error) + type ComponentEndpointArray struct + ComponentEndpoints []*ComponentEndpoint + type ComponentPut struct + Component base.Component + Force bool + func NewCompPut(comp base.Component, force bool) (*ComponentPut, error) + func (cp *ComponentPut) VerifyNormalize() error + type ComponentsPost struct + Force bool + func NewCompPost(comps []base.Component, force bool) (*ComponentsPost, error) + func (cp *ComponentsPost) VerifyNormalize() error + type DiscoverIn struct + Force bool + XNames []string + type DiscoveryStatus struct + Details *json.RawMessage + ID uint + LastUpdate string + Status string + type Group struct + Description string + ExclusiveGroup string + Label string + Members Members + Tags []string + func NewGroup(label, desc, exclGrp string, tags, member_ids []string) (*Group, error) + func (g *Group) Normalize() + func (g *Group) Verify() error + type GroupPatch struct + Description *string + Tags *[]string + func (gp *GroupPatch) Normalize() + func (gp *GroupPatch) Verify() error + type HWInvByFRU struct + FRUID string + HMSCDUMgmtSwitchFRUInfo *rf.ChassisFRUInfoRF + HMSCMMRectifierFRUInfo *rf.PowerSupplyFRUInfoRF + HMSCabinetFRUInfo *rf.ChassisFRUInfoRF + HMSChassisFRUInfo *rf.ChassisFRUInfoRF + HMSComputeModuleFRUInfo *rf.ChassisFRUInfoRF + HMSDriveFRUInfo *rf.DriveFRUInfoRF + HMSHSNBoardFRUInfo *rf.ChassisFRUInfoRF + HMSHSNNICFRUInfo *rf.NAFRUInfoRF + HMSMemoryFRUInfo *rf.MemoryFRUInfoRF + HMSMgmtHLSwitchFRUInfo *rf.ChassisFRUInfoRF + HMSMgmtSwitchFRUInfo *rf.ChassisFRUInfoRF + HMSNodeAccelFRUInfo *rf.ProcessorFRUInfoRF + HMSNodeAccelRiserFRUInfo *rf.NodeAccelRiserFRUInfoRF + HMSNodeBMCFRUInfo *rf.ManagerFRUInfoRF + HMSNodeEnclosureFRUInfo *rf.ChassisFRUInfoRF + HMSNodeEnclosurePowerSupplyFRUInfo *rf.PowerSupplyFRUInfoRF + HMSNodeFRUInfo *rf.SystemFRUInfoRF + HMSOutletFRUInfo *rf.OutletFRUInfo + HMSPDUFRUInfo *rf.PowerDistributionFRUInfo + HMSProcessorFRUInfo *rf.ProcessorFRUInfoRF + HMSRouterBMCFRUInfo *rf.ManagerFRUInfoRF + HMSRouterModuleFRUInfo *rf.ChassisFRUInfoRF + HWInventoryByFRUType string + Subtype string + Type string + func (hf *HWInvByFRU) DecodeFRUInfo(fruInfoJSON []byte) error + func (hf *HWInvByFRU) EncodeFRUInfo() ([]byte, error) + type HWInvByLoc struct + HMSCDUMgmtSwitchLocationInfo *rf.ChassisLocationInfoRF + HMSCMMRectifierLocationInfo *rf.PowerSupplyLocationInfoRF + HMSCabinetLocationInfo *rf.ChassisLocationInfoRF + HMSChassisLocationInfo *rf.ChassisLocationInfoRF + HMSComputeModuleLocationInfo *rf.ChassisLocationInfoRF + HMSDriveLocationInfo *rf.DriveLocationInfoRF + HMSHSNBoardLocationInfo *rf.ChassisLocationInfoRF + HMSHSNNICLocationInfo *rf.NALocationInfoRF + HMSMemoryLocationInfo *rf.MemoryLocationInfoRF + HMSMgmtHLSwitchLocationInfo *rf.ChassisLocationInfoRF + HMSMgmtSwitchLocationInfo *rf.ChassisLocationInfoRF + HMSNodeAccelLocationInfo *rf.ProcessorLocationInfoRF + HMSNodeAccelRiserLocationInfo *rf.NodeAccelRiserLocationInfoRF + HMSNodeBMCLocationInfo *rf.ManagerLocationInfoRF + HMSNodeEnclosureLocationInfo *rf.ChassisLocationInfoRF + HMSNodeEnclosurePowerSupplyLocationInfo *rf.PowerSupplyLocationInfoRF + HMSNodeLocationInfo *rf.SystemLocationInfoRF + HMSOutletLocationInfo *rf.OutletLocationInfo + HMSPDULocationInfo *rf.PowerDistributionLocationInfo + HMSProcessorLocationInfo *rf.ProcessorLocationInfoRF + HMSRouterBMCLocationInfo *rf.ManagerLocationInfoRF + HMSRouterModuleLocationInfo *rf.ChassisLocationInfoRF + HWInventoryByLocationType string + ID string + Ordinal int + PopulatedFRU *HWInvByFRU + Status string + Type string + func NewHWInvByLocs(hwlocs []HWInvByLoc) ([]*HWInvByLoc, error) + func (hw *HWInvByLoc) DecodeLocationInfo(locInfoJSON []byte) error + func (hw *HWInvByLoc) EncodeLocationInfo() ([]byte, error) + type HWInvHist struct + EventType string + FruId string + ID string + Timestamp string + type HWInvHistArray struct + History []*HWInvHist + ID string + type HWInvHistFmt int + const HWInvHistFmtByFRU + const HWInvHistFmtByLoc + type HWInvHistResp struct + Components []HWInvHistArray + func NewHWInvHistResp(hwHists []*HWInvHist, format HWInvHistFmt) (*HWInvHistResp, error) + type IPAddressMapping struct + IPAddr string + Network string + func NewIPAddressMapping(ipAddr, network string) (*IPAddressMapping, error) + func (ipm *IPAddressMapping) Verify() error + type IPAddressMappingPatch struct + Network *string + type Job struct + Data interface{} + func NewStateRFPollJob(xname string, delay, poll, lifetime, keepAlive int) (*Job, error) + type JobData struct + Id string + KeepAlive int + LastUpdate string + Lifetime int + Status string + Type string + type MemberAddBody struct + ID string + type MemberPutBody struct + Group string + IDs []string + type Members struct + IDs []string + func NewMembers() *Members + func (ms *Members) Normalize() + func (ms *Members) Verify() error + type Membership struct + GroupLabels []string + ID string + PartitionName string + type NodeMap struct + ID string + NID int + NodeInfo *json.RawMessage + Role string + SubRole string + func NewNodeMap(id, role, subRole string, nid int, nodeInfo *json.RawMessage) (*NodeMap, error) + type NodeMapArray struct + NodeMaps []*NodeMap + type Partition struct + Description string + Members Members + Name string + Tags []string + func NewPartition(name, desc string, tags, member_ids []string) (*Partition, error) + func (p *Partition) Normalize() + func (p *Partition) Verify() error + type PartitionPatch struct + Description *string + Tags *[]string + func (pp *PartitionPatch) Normalize() + func (pp *PartitionPatch) Verify() error + type PowerMap struct + ID string + PoweredBy []string + func NewPowerMap(id string, poweredBy []string) (*PowerMap, error) + type RedfishEndpoint struct + ComponentEndpoints []*ComponentEndpoint + ServiceEndpoints []*ServiceEndpoint + func NewRedfishEndpoint(epd *rf.RedfishEPDescription) *RedfishEndpoint + type RedfishEndpointArray struct + RedfishEndpoints []*RedfishEndpoint + func (eps *RedfishEndpointArray) GetResourceURIArray(uriBase string) []*ResourceURI + type RedfishEndpointPatch struct + Domain *string + Enabled *bool + FQDN *string + Hostname *string + ID *string + IPAddr *string + MACAddr *string + MACRequired *bool + Name *string + Password *string + RediscOnUpdate *bool + TemplateID *string + Type *string + UUID *string + UseSSDP *bool + User *string + type ResourceURI struct + URI string + type SCNPatchSubscription struct + Enabled *bool + Op string + Roles []string + SoftwareStatus []string + States []string + SubRoles []string + type SCNPayload struct + Components []string + Enabled *bool + Flag string + Role string + SoftwareStatus string + State string + SubRole string + type SCNPostSubscription struct + Enabled *bool + Roles []string + SoftwareStatus []string + States []string + SubRoles []string + Subscriber string + Url string + type SCNSubscription struct + Enabled *bool + ID int64 + Roles []string + SoftwareStatus []string + States []string + SubRoles []string + Subscriber string + Url string + type SCNSubscriptionArray struct + SubscriptionList []SCNSubscription + type SMEvent struct + ComponentArray *base.ComponentArray + EventSubtype string + EventType string + HWInventory *SystemHWInventory + RedfishEndpointArray *RedfishEndpointArray + type SMEventArray struct + Events []*SMEvent + Name string + Timestamp string + Version string + type SMEventSubtype string + const HWInventoryAdded + const HWInventoryModifed + const HWInventoryRemoved + const NodeAvailable + const NodeFailed + const NodeNIDChanged + const NodeRoleChanged + const NodeStandby + const NodeSubRoleChanged + const NodeUnavailable + const RedfishEndpointAdded + const RedfishEndpointDisabled + const RedfishEndpointEnabled + const RedfishEndpointModified + const RedfishEndpointRemoved + const StateTransitionAbnormal + const StateTransitionDisable + const StateTransitionEnable + const StateTransitionOK + type SMEventType string + const HWInventoryChange + const NodeStateChange + const RedfishEndpointChange + const StateChange + type SMPatchOp int + const PatchOpAdd + const PatchOpInvalid + const PatchOpRemove + const PatchOpReplace + func GetPatchOp(op string) SMPatchOp + type ServiceEndpoint struct + RfEndpointFQDN string + ServiceInfo json.RawMessage + URL string + type ServiceEndpointArray struct + ServiceEndpoints []*ServiceEndpoint + type SrfpJobData struct + CompId string + Delay int + Poll int + type SystemHWInventory struct + Format string + XName string + func NewSystemHWInventory(hwlocs []*HWInvByLoc, xName, format string) (*SystemHWInventory, error)