Documentation ¶
Overview ¶
* MIT License * * (C) Copyright [2020-2024] Hewlett Packard Enterprise Development LP * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- func DiscoveryInfoEquals(obj rf.DiscoveryInfo, other rf.DiscoveryInfo) bool
- type HSMProvider
- type HSM_GLOBALS
- type HSMv0
- func (b *HSMv0) ClearLock(xnames []string) (error error)
- func (b *HSMv0) FillComponentEndpointData(hd *map[string]HsmData) (errs []error)
- func (b *HSMv0) FillHSMData(xnames []string, partitions []string, groups []string, types []string) (hd map[string]HsmData, errs []error)
- func (b *HSMv0) FillModelManufacturerRF(hd *map[string]HsmData) (errs []error)
- func (b *HSMv0) FillRedfishEndpointData(hd *map[string]HsmData) (errs []error)
- func (b *HSMv0) FillUpdateServiceData(hd *map[string]HsmData) (errs []error)
- func (b *HSMv0) GetStateComponents(xnames []string, partitions []string, groups []string, types []string) (data base.ComponentArray, err error)
- func (b *HSMv0) GetTargetsRF(hd *map[string]HsmData) (tuples []XnameTarget, errs []error)
- func (b *HSMv0) Init(globals *HSM_GLOBALS) (err error)
- func (b *HSMv0) Ping() (err error)
- func (b *HSMv0) RefillModelRF(XnameTargetHsmData *map[XnameTarget]HsmData, specialTargets map[string]string) (errs []error)
- func (b *HSMv0) RestoreCredentials(hd *HsmData) (err error)
- func (b *HSMv0) SetLock(xnames []string) (error error)
- type HsmData
- type InventoryHardware
- type NodeInfo
- type RedfishEndpointIDs
- type RedfishEndpoints
- type RedfishModel
- type StateComponents
- type TargetedMembers
- type UpdateService
- type XnameTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoveryInfoEquals ¶
func DiscoveryInfoEquals(obj rf.DiscoveryInfo, other rf.DiscoveryInfo) bool
Types ¶
type HSMProvider ¶
type HSMProvider interface { RefillModelRF(XtHd *map[XnameTarget]HsmData, specialTargets map[string]string) (errs []error) GetTargetsRF(hd *map[string]HsmData) (tuples []XnameTarget, errs []error) FillRedfishEndpointData(hd *map[string]HsmData) (errs []error) FillUpdateServiceData(hd *map[string]HsmData) (errs []error) FillModelManufacturerRF(hd *map[string]HsmData) (errs []error) FillComponentEndpointData(hd *map[string]HsmData) (errs []error) GetStateComponents(xnames []string, partitions []string, groups []string, types []string) (data base.ComponentArray, err error) FillHSMData(xnames []string, partitions []string, groups []string, types []string) (hd map[string]HsmData, errs []error) RestoreCredentials(hd *HsmData) (err error) //OtherStuff -> GOOD ClearLock(xnames []string) error SetLock(xnames []string) error Ping() (err error) Init(globals *HSM_GLOBALS) (err error) }
type HSM_GLOBALS ¶
type HSM_GLOBALS struct { Logger *logrus.Logger BaseTRSTask *trsapi.HttpTask RFTloc *trsapi.TrsAPI SVCTloc *trsapi.TrsAPI RFClientLock *sync.RWMutex StateManagerServer string VaultEnabled bool VaultKeypath string Credentials *compcredentials.CompCredStore Running *bool LockEnabled bool RFHttpClient *hms_certs.HTTPClientPair SVCHttpClient *hms_certs.HTTPClientPair Reservation reservation.Production }
func (*HSM_GLOBALS) NewGlobals ¶
func (g *HSM_GLOBALS) NewGlobals(Logger *logrus.Logger, baseTRSRequest *trsapi.HttpTask, tlocRF *trsapi.TrsAPI, tlocSVC *trsapi.TrsAPI, clientRF *hms_certs.HTTPClientPair, clientSVC *hms_certs.HTTPClientPair, rfClientLock *sync.RWMutex, sms string, vault bool, keypath string, running *bool, lockEnabled bool)
type HSMv0 ¶
type HSMv0 struct {
HSMGlobals HSM_GLOBALS
}
func (*HSMv0) FillComponentEndpointData ¶
func (*HSMv0) FillHSMData ¶
func (*HSMv0) FillModelManufacturerRF ¶
func (*HSMv0) FillRedfishEndpointData ¶
func (*HSMv0) FillUpdateServiceData ¶
func (*HSMv0) GetStateComponents ¶
func (*HSMv0) GetTargetsRF ¶
func (b *HSMv0) GetTargetsRF(hd *map[string]HsmData) (tuples []XnameTarget, errs []error)
func (*HSMv0) Init ¶
func (b *HSMv0) Init(globals *HSM_GLOBALS) (err error)
func (*HSMv0) RefillModelRF ¶
func (b *HSMv0) RefillModelRF(XnameTargetHsmData *map[XnameTarget]HsmData, specialTargets map[string]string) (errs []error)
RefillModelRF -> will take a listing of xnameTargets / hsmdata + a list of special targets/ rf paths and perform an operation to reset the hsmdata.model. It will use the rf path to query the device and pull out the model
func (*HSMv0) RestoreCredentials ¶
type HsmData ¶
type HsmData struct { ID string `json:"id,omitempty"` Type string `json:"type"` Hostname string `json:"hostname,omitempty"` Domain string `json:"domain,omitempty"` FQDN string `json:"FQDN"` Password string `json:"-"` User string `json:"-"` UpdateURI string `json:"updateURI"` InventoryURI string `json:"inventoryURI"` Role string `json:"role"` Model string `json:"model"` Manufacturer string `json:"manufacturer"` Error error `json:"error"` BmcPath string `json:"bmdPath"'` RfType string `json:"rfType"` DiscInfo rf.DiscoveryInfo `json:"DiscoveryInfo,omitempty"` ActionReset rf.ActionReset `json:"actionReset,omitempty"` }
func ToHsmDataFromRFEndpoint ¶
func ToHsmDataFromRFEndpoint(src *rf.RedfishEPDescription) (dst HsmData)
type InventoryHardware ¶
type InventoryHardware struct { PopulatedFRU struct { NodeFRUInfo struct { Model string `json:"Models"` } } }
type RedfishEndpointIDs ¶
type RedfishEndpointIDs struct { RedfishEndpoints []struct { Id string `json:"id"` } }
type RedfishEndpoints ¶
type RedfishEndpoints struct {
RedfishEndpoints []HsmData `json:"RedfishEndpoints"`
}
type RedfishModel ¶
type RedfishModel struct {
Model string `json:"Model"`
}
type StateComponents ¶
type StateComponents struct {
Role string `json:"Role"`
}
type TargetedMembers ¶
type UpdateService ¶
type UpdateService struct { ServiceInfo struct { FirmwareInventory struct { Path string `json:"@odata.id"` } `json:"FirmwareInventory"` SoftwareInventory struct { Path string `json:"@odata.id"` } `json:"SoftwareInventory"` Actions struct { Update struct { Path string `json:"target"` } `json:"#UpdateService.SimpleUpdate"` } } }