Documentation ¶
Index ¶
- Variables
- func AbortActionID(actionID uuid.UUID) (pb model.Passback)
- func BuildSnapshot(snapshot storage.Snapshot)
- func CheckBlockage(allOperations *[]storage.Operation)
- func ConfigureSystemForUnitTesting()
- func CreateImage(i presentation.RawImage) (pb model.Passback)
- func CreateSnapshot(parameters storage.SnapshotParameters) (pb model.Passback)
- func DeleteAction(id uuid.UUID) (pb model.Passback)
- func DeleteExpiredActions(daysToKeep int)
- func DeleteExpiredSnapshots()
- func DeleteImage(imageID uuid.UUID) (pb model.Passback)
- func DeleteLoaderRun(id uuid.UUID) (pb model.Passback)
- func DeleteSnapshot(name string) (pb model.Passback)
- func DeleteStoredAction(actionID uuid.UUID) (err error)
- func DeleteStoredImage(imageID uuid.UUID) (err error)
- func DeleteStoredOperation(operationID uuid.UUID) (err error)
- func DeleteStoredSnapshot(name string) (err error)
- func DoLoadFromNexus(sleeptimeMinutes int)
- func DoLoader(localFile string, id uuid.UUID)
- func FillInImageIDForDevices(deviceMap *map[string]storage.Device, hsmData *map[hsm.XnameTarget]hsm.HsmData, ...)
- func FillInImageId(operation *storage.Operation, imageMap *map[uuid.UUID]storage.Image, ...) (err error)
- func FilterImage(candidateOperations *map[uuid.UUID]storage.Operation, ...) (err error)
- func FilterModelManufacturer(dataMap *map[hsm.XnameTarget]hsm.HsmData, ...) (err error)
- func FilterTargets(hsmDataMap *map[string]hsm.HsmData, parameters storage.TargetFilter) (XnameTargets []hsm.XnameTarget, MatchedXnameTargets []hsm.XnameTarget, ...)
- func FlattenDeviceMap(A map[string]storage.Device) (B []storage.Device)
- func FullJoinDeviceMap(A map[string]storage.Device, B map[string]storage.Device) (C map[string]storage.Device)
- func GenerateOperations(actionID uuid.UUID)
- func GetAction(id uuid.UUID) (pb model.Passback)
- func GetActionDetail(id uuid.UUID) (pb model.Passback)
- func GetActionOperationID(actionID uuid.UUID, operationID uuid.UUID) (pb model.Passback)
- func GetActionState(id uuid.UUID) (action storage.Action)
- func GetActionStatus(actionID uuid.UUID) (pb model.Passback)
- func GetAllAbortSignaledActions() []storage.Action
- func GetAllActions() (pb model.Passback)
- func GetAllActiveOperationsFromAction(actionID uuid.UUID) []storage.Operation
- func GetAllNonCompleteNonInitialActions() []storage.Action
- func GetAllOperations() (operations []storage.Operation, err error)
- func GetAllOperationsFromAction(actionID uuid.UUID) (operations []storage.Operation, err error)
- func GetCurrentFirmwareVersionsFromHsmDataAndTargets(hd map[hsm.XnameTarget]hsm.HsmData) (deviceMap map[string]storage.Device, errors []string)
- func GetCurrentFirmwareVersionsFromParams(params storage.SnapshotParameters) (devices []storage.Device, errlist []string)
- func GetFirmwareVersionURL(data hsm.HsmData, target string) (retURL string, err error)
- func GetImage(imageID uuid.UUID) (pb model.Passback)
- func GetImageMap() (images map[uuid.UUID]storage.Image)
- func GetImageStorage(imageID uuid.UUID) (pb model.Passback)
- func GetImages() (pb model.Passback)
- func GetLoaderStatus() (pb model.Passback)
- func GetLoaderStatusID(id uuid.UUID) (pb model.Passback)
- func GetOperationSummaryFromAction(actionID uuid.UUID) (operationCounts presentation.OperationCounts)
- func GetSnapshot(name string) (pb model.Passback)
- func GetSnapshots() (pb model.Passback)
- func GetStoredAction(actionID uuid.UUID) (action storage.Action, err error)
- func GetStoredActions() (actions []storage.Action, err error)
- func GetStoredImage(imageID uuid.UUID) (image storage.Image, err error)
- func GetStoredImages() (images []storage.Image, err error)
- func GetStoredOperation(operationID uuid.UUID) (operation storage.Operation, err error)
- func GetStoredOperations(actionID uuid.UUID) (operations []storage.Operation, err error)
- func GetStoredSnapshot(name string) (snapshot storage.Snapshot, err error)
- func GetStoredSnapshots() (snapshots []storage.Snapshot, err error)
- func GetTaskLinkURL(data hsm.HsmData, tasklink string) (retURL string, err error)
- func GetUpdateInfoURL(data hsm.HsmData, updateinfolink string) (retURL string, err error)
- func Init(glob *DOMAIN_GLOBALS)
- func NumImages() (num int, err error)
- func PruneXnameTargetList(hd *map[hsm.XnameTarget]hsm.HsmData) (badDeviceMap map[string]storage.Device, errors []string)
- func RestoreSnapshot(action storage.Action, snapshot storage.Snapshot)
- func RetrieveFirmwareVersion(hd *hsm.HsmData, target string) (firmwareVersion string, err error)
- func RetrieveFirmwareVersionFromTargets(hd *map[hsm.XnameTarget]hsm.HsmData) (deviceMap map[string]storage.Device, err error)
- func RetrieveTaskStatus(hd *hsm.HsmData, tasklink string) (stateStatus model.TaskStateStatus, err error)
- func RetrieveUpdateInfo(hd *hsm.HsmData, updateinfolink string) (updateInfo model.UpdateInfo, err error)
- func ServiceStatusDetails(check CheckServiceStatus) (pb model.Passback)
- func SetErrSolOp(candidateOperation *storage.Operation)
- func SetFirmwareVersion(candidateOperation *storage.Operation, deviceMap *map[string]storage.Device)
- func SetNoOpOp(candidateOperation *storage.Operation, overwriteSameImage bool)
- func SetNoSolOp(candidateOperation *storage.Operation)
- func StartRestoreSnapshot(name string, overrideDryrun bool, timeLimit int) (pb model.Passback)
- func StoreAction(action storage.Action) (err error)
- func StoreImage(image storage.Image) (err error)
- func StoreOperation(operation storage.Operation) (err error)
- func StoreSnapshot(snapshot storage.Snapshot) (err error)
- func TriggerFirmwareUpdate(params storage.ActionParameters) (pb model.Passback)
- func UpdateImage(image presentation.RawImage, imageid uuid.UUID) (pb model.Passback)
- func ValidateActionParameters(l *storage.ActionParameters) (err error)
- func ValidateCommandParameter(c *storage.Command) (err error)
- func ValidateImageFilter(i *storage.ImageFilter) (err error)
- func ValidateImageParameters(i *storage.Image) (err error)
- func ValidateSnapshotParameters(l *storage.SnapshotParameters) (err error)
- func ValidateStateComponentFilter(c *storage.StateComponentFilter) (err error)
- func ValidateXnames(c *storage.StateComponentFilter) (err error)
- type CheckServiceStatus
- type DOMAIN_GLOBALS
- type ServiceStatus
Constants ¶
This section is empty.
Variables ¶
var DSP storage.StorageProvider
var IsHandledCSFUT bool
var LOADERLOGSDIR string = "/fw/loaderlogs/"
var LoaderRunning bool = false
var UTMutex sync.Mutex
Functions ¶
func AbortActionID ¶
AbortActionID - halt a running action
func BuildSnapshot ¶
func CheckBlockage ¶
CheckBlockage scans all blockedOperations and checks if its blocker is completed, if it is then it updates the state to configured
func ConfigureSystemForUnitTesting ¶
func ConfigureSystemForUnitTesting()
func CreateImage ¶
func CreateImage(i presentation.RawImage) (pb model.Passback)
CreateImage - will create an image
func CreateSnapshot ¶
func CreateSnapshot(parameters storage.SnapshotParameters) (pb model.Passback)
TODO if a ImageID isnt set for a device target, we cant restore it! -> therefore we should probably point that out in the return data!
func DeleteAction ¶
DeleteAction - deletes a non running action
func DeleteExpiredActions ¶ added in v1.27.0
func DeleteExpiredActions(daysToKeep int)
func DeleteExpiredSnapshots ¶ added in v1.27.0
func DeleteExpiredSnapshots()
func DeleteImage ¶
DeleteImage - deletes an Image
func DeleteSnapshot ¶
func DeleteStoredAction ¶ added in v1.24.0
func DeleteStoredImage ¶ added in v1.24.0
func DeleteStoredOperation ¶ added in v1.24.0
func DeleteStoredSnapshot ¶ added in v1.24.0
func DoLoadFromNexus ¶
func DoLoadFromNexus(sleeptimeMinutes int)
Loads firmware from Nexus - Called when FAS Starts Continues runnning until images are in FAS
func FillInImageIDForDevices ¶
func FillInImageId ¶
func FilterImage ¶
func FilterModelManufacturer ¶
func FilterModelManufacturer(dataMap *map[hsm.XnameTarget]hsm.HsmData, parameters storage.InventoryHardwareFilter) (err error)
func FilterTargets ¶
func FilterTargets(hsmDataMap *map[string]hsm.HsmData, parameters storage.TargetFilter) (XnameTargets []hsm.XnameTarget, MatchedXnameTargets []hsm.XnameTarget, UnMatchedXnameTargets []hsm.XnameTarget)
func FullJoinDeviceMap ¶
func GenerateOperations ¶
Create Update List for this Update ActionID and add to Master Update List
func GetActionDetail ¶
GetActionDetail - gets an action and formats it for presentation
func GetActionOperationID ¶
GetActionOperationID - gets the operation for an action
func GetAllActions ¶
GetAllActions - gets all actions from the system formatting them as a summary
func GetAllOperations ¶ added in v1.27.0
func GetCurrentFirmwareVersionsFromHsmDataAndTargets ¶
func GetCurrentFirmwareVersionsFromHsmDataAndTargets(hd map[hsm.XnameTarget]hsm.HsmData) (deviceMap map[string]storage.Device, errors []string)
passing in a copy!
func GetCurrentFirmwareVersionsFromParams ¶
func GetCurrentFirmwareVersionsFromParams(params storage.SnapshotParameters) (devices []storage.Device, errlist []string)
func GetFirmwareVersionURL ¶
func GetLoaderStatus ¶
func GetOperationSummaryFromAction ¶
func GetOperationSummaryFromAction(actionID uuid.UUID) (operationCounts presentation.OperationCounts)
func GetSnapshot ¶
GetSnapshot - gets a snapshot summary
func GetSnapshots ¶
GetSnapshots - gets all snapshot summaries
func GetStoredAction ¶ added in v1.24.0
func GetStoredActions ¶ added in v1.24.0
func GetStoredImage ¶ added in v1.24.0
func GetStoredImages ¶ added in v1.24.0
func GetStoredOperation ¶ added in v1.24.0
func GetStoredOperations ¶ added in v1.24.0
func GetStoredSnapshot ¶ added in v1.24.0
func GetStoredSnapshots ¶ added in v1.24.0
func GetTaskLinkURL ¶
func GetUpdateInfoURL ¶
func Init ¶
func Init(glob *DOMAIN_GLOBALS)
func PruneXnameTargetList ¶
func PruneXnameTargetList(hd *map[hsm.XnameTarget]hsm.HsmData) (badDeviceMap map[string]storage.Device, errors []string)
PruneXnameTargetList -> if there is an xnametarget, whose hsmdata isnt DiscoverOK, then we CANT get the fw version, so kick it out.
func RetrieveFirmwareVersion ¶
func RetrieveTaskStatus ¶
func RetrieveUpdateInfo ¶
func ServiceStatusDetails ¶
func ServiceStatusDetails(check CheckServiceStatus) (pb model.Passback)
func SetErrSolOp ¶ added in v1.28.0
func SetFirmwareVersion ¶
func SetNoSolOp ¶
func StartRestoreSnapshot ¶
func StoreAction ¶
func StoreImage ¶ added in v1.24.0
func StoreOperation ¶
func StoreSnapshot ¶ added in v1.24.0
func TriggerFirmwareUpdate ¶
func TriggerFirmwareUpdate(params storage.ActionParameters) (pb model.Passback)
TriggerFirmwareUpdate - will construct an ID, and async fire off work
func UpdateImage ¶
UpdateImage - create or update an image
func ValidateActionParameters ¶
func ValidateActionParameters(l *storage.ActionParameters) (err error)
ValidateActionParameters -> will VALIDATE the parameters, and set a few defaults along the way. It will check that an xname is a valid form, but not that it exists. When we generate the operations we will only generate ones we can we will flush out the list and return it to users... if they ask for a 'valid' xname that doesnt exist, is that an error? at this point I say NO; dont prevent everthing else so the question then becomes, how does an admin learn that an xname wasnt actually used?
func ValidateImageFilter ¶
func ValidateImageFilter(i *storage.ImageFilter) (err error)
ValidateImageFilter - makes sure that if set 1 and ONLY 1 image corresponds to the
func ValidateImageParameters ¶
Require:
ImageID - Non-nil CreateTime - DeviceType - Required Manufacturer - Required Models - Required Target - Required Tags - FirmwareVersion - Required SemanticFirmwareVersion - Required UpdateURI - VersionURI - NeedManualReboot - S3URL - Required AllowableDeviceStates - DependsOn - tftpURL
func ValidateSnapshotParameters ¶
func ValidateSnapshotParameters(l *storage.SnapshotParameters) (err error)
func ValidateStateComponentFilter ¶
func ValidateStateComponentFilter(c *storage.StateComponentFilter) (err error)
func ValidateXnames ¶
func ValidateXnames(c *storage.StateComponentFilter) (err error)
Types ¶
type CheckServiceStatus ¶
type DOMAIN_GLOBALS ¶
type DOMAIN_GLOBALS struct { CAUri string BaseTRSTask *trs_http_api.HttpTask RFTloc *trs_http_api.TrsAPI HSMTloc *trs_http_api.TrsAPI RFClientLock *sync.RWMutex Running *bool DSP *storage.StorageProvider HSM *hsm.HSMProvider RFHttpClient *hms_certs.HTTPClientPair SVCHttpClient *hms_certs.HTTPClientPair RFTransportReady *bool DaysToKeepActions int }
var GLOB *DOMAIN_GLOBALS
func (*DOMAIN_GLOBALS) NewGlobals ¶
func (g *DOMAIN_GLOBALS) NewGlobals(base *trs_http_api.HttpTask, tlocRF *trs_http_api.TrsAPI, tlocSVC *trs_http_api.TrsAPI, clientRF *hms_certs.HTTPClientPair, clientSVC *hms_certs.HTTPClientPair, rfClientLock *sync.RWMutex, running *bool, dsp *storage.StorageProvider, hsm *hsm.HSMProvider, daysToKeepActions int)