presentation

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionMarshaled

type ActionMarshaled struct {
	ActionID         uuid.UUID                `json:"actionID"`
	SnapshotID       uuid.UUID                `json:"snapshotID,omitempty"`
	Command          storage.Command          `json:"command"`
	StartTime        string                   `json:"startTime"`
	EndTime          string                   `json:"endTime,omitempty"`
	State            string                   `json:"state"`
	Parameters       storage.ActionParameters `json:"parameters,omitempty"`
	OperationSummary OperationSummary         `json:"operationSummary"`
	BlockedBy        []uuid.UUID              `json:"blockedBy"`
	Errors           []string                 `json:"errors"`
}

func ToActionMarshaledFromAction

func ToActionMarshaledFromAction(a storage.Action) (m ActionMarshaled, err error)

func (*ActionMarshaled) Equals

func (obj *ActionMarshaled) Equals(other ActionMarshaled) bool

type ActionOperationsDetail

type ActionOperationsDetail struct {
	ActionID         uuid.UUID                `json:"actionID"`
	SnapshotID       uuid.UUID                `json:"snapshotID,omitempty"`
	Command          storage.Command          `json:"command"`
	StartTime        string                   `json:"startTime"`
	EndTime          string                   `json:"endTime,omitempty"`
	State            string                   `json:"state"`
	Parameters       storage.ActionParameters `json:"parameters,omitempty"`
	OperationDetails OperationDetail          `json:"operationDetails"`
	BlockedBy        []uuid.UUID              `json:"blockedBy"`
	Errors           []string                 `json:"errors"`
}

func ToActionOperationsDetailFromAction

func ToActionOperationsDetailFromAction(a storage.Action) (m ActionOperationsDetail, err error)

type ActionSummaries

type ActionSummaries struct {
	Actions []ActionSummary `json:"actions"`
}

func (*ActionSummaries) Equals

func (obj *ActionSummaries) Equals(other ActionSummaries) (equals bool)

type ActionSummary

type ActionSummary struct {
	ActionID        uuid.UUID       `json:"actionID"`
	SnapshotID      uuid.UUID       `json:"snapshotID,omitempty"`
	Command         storage.Command `json:"command"`
	StartTime       string          `json:"startTime"`
	EndTime         string          `json:"endTime,omitempty"`
	State           string          `json:"state"`
	OperationCounts OperationCounts `json:"operationCounts"`
	BlockedBy       []uuid.UUID     `json:"blockedBy"`
	Errors          []string        `json:"errors"`
}

func ToActionSummaryFromAction

func ToActionSummaryFromAction(a storage.Action) (s ActionSummary, err error)

func (*ActionSummary) Equals

func (obj *ActionSummary) Equals(other ActionSummary) bool

type CreateActionPayload

type CreateActionPayload struct {
	ActionID       uuid.UUID `json:"actionID"`
	OverrideDryrun bool      `json:"overrideDryrun"`
}

type DeviceMarshaled added in v1.15.0

type DeviceMarshaled struct {
	Xname   string            `json:"xname"`
	Targets []TargetMarshaled `json:"targets"`
	Error   string            `json:"error"`
}

func ToDeviceMarshaled added in v1.15.0

func ToDeviceMarshaled(from []storage.Device) (to []DeviceMarshaled)

func (*DeviceMarshaled) Equals added in v1.15.0

func (obj *DeviceMarshaled) Equals(other DeviceMarshaled) (equals bool)

type ImageMarshaled

type ImageMarshaled struct {
	ImageID                           uuid.UUID `json:"imageID"`
	CreateTime                        string    `json:"createTime,omitempty"`
	DeviceType                        string    `json:"deviceType,omitempty"`
	Manufacturer                      string    `json:"manufacturer,omitempty"`
	Models                            []string  `json:"models,omitempty"`
	SoftwareIds                       []string  `json:"softwareIds,omitempty"`
	Target                            string    `json:"target,omitempty"`
	Tags                              []string  `json:"tags,omitempty"`
	FirmwareVersion                   string    `json:"firmwareVersion,omitempty"`
	SemanticFirmwareVersion           string    `json:"semanticFirmwareVersion,omitempty"`
	UpdateURI                         string    `json:"updateURI,omitempty"`
	NeedManualReboot                  bool      `json:"needManualReboot,omitempty"`
	WaitTimeBeforeManualRebootSeconds int       `json:"waitTimeBeforeManualRebootSeconds,omitempty"`
	WaitTimeAfterRebootSeconds        int       `json:"waitTimeAfterRebootSeconds,omitempty"`
	PollingSpeedSeconds               int       `json:"pollingSpeedSeconds,omitempty"`
	ForceResetType                    string    `json:"forceResetType,omitempty"`
	S3URL                             string    `json:"s3URL,omitempty"`
	TftpURL                           string    `json:"tftpURL,omitempty"`
	AllowableDeviceStates             []string  `json:"allowableDeviceStates,omitempty"`
}

func ToImageMarshaled

func ToImageMarshaled(from storage.Image) (to ImageMarshaled)

func (ImageMarshaled) Equals

func (obj ImageMarshaled) Equals(other ImageMarshaled) bool

type Images

type Images struct {
	Images []ImageMarshaled `json:"images"'`
}

type LoaderList

type LoaderList struct {
	LoaderRunID string `json:"loaderRunID,omitempty"`
}

type LoaderOutput

type LoaderOutput struct {
	Output []string `json:"loaderRunOutput,omitempty"`
}

type LoaderStatus

type LoaderStatus struct {
	Status        string       `json:"loaderStatus,omitempty"`
	LoaderRunList []LoaderList `json:"loaderRunList,omitempty"`
}

type OperationCounts

type OperationCounts struct {
	Total         int `json:"total"`
	Initial       int `json:"initial"`
	Configured    int `json:"configured"`
	Blocked       int `json:"blocked"`
	NeedsVerified int `json:"needsVerified"`
	Verifying     int `json:"verifying"`
	InProgress    int `json:"inProgress"`
	Failed        int `json:"failed"`
	Succeeded     int `json:"succeeded"`
	NoOperation   int `json:"noOperation"`
	NoSolution    int `json:"noSolution"`
	Aborted       int `json:"aborted"`
	Unknown       int `json:"unknown"`
}

func ToOperationCountsFromOperations

func ToOperationCountsFromOperations(o []storage.Operation) (c OperationCounts, err error)

type OperationDetail

type OperationDetail struct {
	Initial       OperationKeysDetail `json:"initial"'`
	Configured    OperationKeysDetail `json:"configured"`    //Not done yet
	Blocked       OperationKeysDetail `json:"blocked"`       //Not done yet
	InProgress    OperationKeysDetail `json:"inProgress"`    //Not done yet
	NeedsVerified OperationKeysDetail `json:"needsVerified"` //Not done yet
	Verifying     OperationKeysDetail `json:"verifying"`     //Not done yet
	Failed        OperationKeysDetail `json:"failed"`        //Done it failed
	Succeeded     OperationKeysDetail `json:"succeeded"`     // Done, it worked
	NoOperation   OperationKeysDetail `json:"noOperation"`   //Nothing done
	NoSolution    OperationKeysDetail `json:"noSolution"`    //nothing CAN be done
	Aborted       OperationKeysDetail `json:"aborted"`       //IT was aborted
	Unknown       OperationKeysDetail `json:"unknown"`       //the state isnt set, but an op exists
}

func ToOperationDetailFromOperations

func ToOperationDetailFromOperations(o []OperationPlusImages) (c OperationDetail, err error)

type OperationKey

type OperationKey struct {
	OperationID         uuid.UUID `json:"operationID"`
	Xname               string    `json:"xname"`
	Target              string    `json:"target"`
	TargetName          string    `json:"targetName"`
	FromFirmwareVersion string    `json:"fromFirmwareVersion"`
	StateHelper         string    `json:"stateHelper"`
	Error               string    `json:"error,omitempty"`
}

func (*OperationKey) Equals

func (obj *OperationKey) Equals(other OperationKey) bool

type OperationKeys

type OperationKeys struct {
	OperationsKeys []OperationKey `json:"operationKeys"`
}

OperationSummary and OperationDetail both need to updated if states are added or removed

func (*OperationKeys) Equals

func (obj *OperationKeys) Equals(other OperationKeys) bool

type OperationKeysDetail

type OperationKeysDetail struct {
	OperationsKeys []OperationMarshaled `json:"operationKeys"`
}

OperationSummary and OperationDetail both need to updated if states are added or removed

type OperationMarshaled

type OperationMarshaled struct {
	OperationID                 uuid.UUID   `json:"operationID"`
	ActionID                    uuid.UUID   `json:"actionID"`
	State                       string      `json:"state"`
	StateHelper                 string      `json:"stateHelper"`
	StartTime                   string      `json:"startTime"`
	EndTime                     string      `json:"endTime,omitempty"`
	RefreshTime                 string      `json:"refreshTime"`
	ExpirationTime              string      `json:"expirationTime"`
	Xname                       string      `json:"xname"`
	DeviceType                  string      `json:"deviceType"`
	Target                      string      `json:"target"`
	TargetName                  string      `json:"targetName"`
	Manufacturer                string      `json:"manufacturer"`
	Model                       string      `json:"model"`
	SoftwareId                  string      `json:"softwareId"`
	FromImageID                 uuid.UUID   `json:"fromImageID"`
	FromSemanticFirmwareVersion string      `json:"fromSemanticFirmwareVersion"` //versionCurrent
	FromFirmwareVersion         string      `json:"fromFirmwareVersion"`         //mVersionCurrent
	FromImageURL                string      `json:"fromImageURL"`
	FromTag                     string      `json:"fromTag"`
	ToImageID                   uuid.UUID   `json:"toImageID"`
	ToSemanticFirmwareVersion   string      `json:"toSemanticFirmwareVersion"` //versionUpdate
	ToFirmwareVersion           string      `json:"toFirmwareVersion"`         //mVersionUpdate
	ToImageURL                  string      `json:"toImageURL"`
	ToTag                       string      `json:"toTag"`
	BlockedBy                   []uuid.UUID `json:"blockedBy"`
	Error                       string      `json:"error"`
}

func ToOperationMarshaledFromOperation

func ToOperationMarshaledFromOperation(o storage.Operation) (m OperationMarshaled, err error)

func (*OperationMarshaled) Equals

func (obj *OperationMarshaled) Equals(other OperationMarshaled) bool

type OperationPlusImages

type OperationPlusImages struct {
	Operation storage.Operation `json:"operation"`
	ToImage   storage.Image     `json:"toImage"`
	FromImage storage.Image     `json:"fromImage"`
}

type OperationSummary

type OperationSummary struct {
	Initial       OperationKeys `json:"initial"`
	Configured    OperationKeys `json:"configured"`    //Not done yet
	Blocked       OperationKeys `json:"blocked"`       //Not done yet
	InProgress    OperationKeys `json:"inProgress"`    //Not done yet
	NeedsVerified OperationKeys `json:"needsVerified"` //Not done yet
	Verifying     OperationKeys `json:"verifying"`     //Not done yet
	Failed        OperationKeys `json:"failed"`        //Done it failed
	Succeeded     OperationKeys `json:"succeeded"`     // Done, it worked
	NoOperation   OperationKeys `json:"noOperation"`   //Nothing done
	NoSolution    OperationKeys `json:"noSolution"`    //nothing CAN be done
	Aborted       OperationKeys `json:"aborted"`       //IT was aborted
	Unknown       OperationKeys `json:"unknown"`       //the state isnt set, but an op exists
}

func ToOperationSummaryFromOperations

func ToOperationSummaryFromOperations(o []storage.Operation) (c OperationSummary, err error)

func (*OperationSummary) Equals

func (obj *OperationSummary) Equals(other OperationSummary) bool

type RawImage

type RawImage struct {
	DeviceType                        string   `json:"deviceType"`
	Manufacturer                      string   `json:"manufacturer,omitempty"`
	Models                            []string `json:"models,omitempty"`
	SoftwareIds                       []string `json:"softwareIds,omitempty"`
	Target                            string   `json:"target,omitempty"`
	Tags                              []string `json:"tags,omitempty"`
	FirmwareVersion                   string   `json:"firmwareVersion"`
	SemanticFirmwareVersion           string   `json:"semanticFirmwareVersion,omitempty"`
	UpdateURI                         string   `json:"updateURI"`
	NeedManualReboot                  bool     `json:"needManualReboot,omitempty"`
	WaitTimeBeforeManualRebootSeconds int      `json:"waitTimeBeforeManualRebootSeconds"`
	WaitTimeAfterRebootSeconds        int      `json:"waitTimeAfterRebootSeconds"`
	PollingSpeedSeconds               int      `json:"pollingSpeedSeconds"`
	ForceResetType                    string   `json:"forceResetType"`
	S3URL                             string   `json:"s3URL"`
	TftpURL                           string   `json:"tftpURL"`
	AllowableDeviceStates             []string `json:"allowableDeviceStates,omitempty"`
}

func (*RawImage) Equals

func (obj *RawImage) Equals(other RawImage) bool

func (*RawImage) NewImage

func (other *RawImage) NewImage() (obj storage.Image, err error)

type RelatedAction

type RelatedAction struct {
	ActionID  uuid.UUID `json:"actionID"`
	StartTime string    `json:"startTime,omitempty"`
	EndTime   string    `json:"endTime,omitempty"`
	State     string    `json:"state,omitempty"`
}

func ToRelatedAction

func ToRelatedAction(a storage.Action) (r RelatedAction)

func (RelatedAction) Equals

func (a RelatedAction) Equals(sub RelatedAction) bool

type SnapshotMarshaled

type SnapshotMarshaled struct {
	Name           string                      `json:"name"`
	CaptureTime    string                      `json:"captureTime"`
	ExpirationTime string                      `json:"expirationTime,omitempty"`
	Ready          bool                        `json:"ready"`
	Devices        []DeviceMarshaled           `json:"devices"`
	RelatedActions []RelatedAction             `json:"relatedActions"`
	Parameters     SnapshotParametersMarshaled `json:"parameters"`
	Errors         []string                    `json:"errors"`
}

func ToSnapshotMarshaled

func ToSnapshotMarshaled(s storage.Snapshot) (m SnapshotMarshaled)

ToSnapshotMarshaled - transforms a snapshot to its marshaled form, will not fill RelatedDevices

func (*SnapshotMarshaled) Equals

func (obj *SnapshotMarshaled) Equals(other SnapshotMarshaled) (equals bool)

type SnapshotName

type SnapshotName struct {
	Name string `json:"name"`
}

type SnapshotParametersMarshaled

type SnapshotParametersMarshaled struct {
	Name                    string                          `json:"name"`
	ExpirationTime          string                          `json:"expirationTime,omitempty"`
	StateComponentFilter    storage.StateComponentFilter    `json:"stateComponentFilter,omitempty"`
	InventoryHardwareFilter storage.InventoryHardwareFilter `json:"inventoryHardwareFilter,omitempty"`
	TargetFilter            storage.TargetFilter            `json:"targetFilter,omitempty"`
}

func ToSnapshotParametersMarshaled

func ToSnapshotParametersMarshaled(obj *storage.SnapshotParameters) (other SnapshotParametersMarshaled)

func (*SnapshotParametersMarshaled) Equals

func (*SnapshotParametersMarshaled) ToSnapshotParameters

func (obj *SnapshotParametersMarshaled) ToSnapshotParameters() (other storage.SnapshotParameters)

TODO the time is not coming through for expirationTime FIX ME

type SnapshotSummaries

type SnapshotSummaries struct {
	Summaries []SnapshotSummary `json:"snapshots"`
}

func (*SnapshotSummaries) Equals

func (obj *SnapshotSummaries) Equals(other SnapshotSummaries) (equals bool)

type SnapshotSummary

type SnapshotSummary struct {
	Name              string          `json:"name"`
	CaptureTime       string          `json:"captureTime"`
	ExpirationTime    string          `json:"expirationTime,omitempty"`
	Ready             bool            `json:"ready"`
	RelatedActions    []RelatedAction `json:"relatedActions"`
	UniqueDeviceCount int             `json:"uniqueDeviceCount"`
}

func ToSnapshotSummary

func ToSnapshotSummary(s storage.Snapshot) (tmp SnapshotSummary)

ToSnapshotSummary will convert from snapshot to summary; will not fill the related devices.

func (*SnapshotSummary) Equals

func (obj *SnapshotSummary) Equals(other SnapshotSummary) (equals bool)

type TargetMarshaled added in v1.15.0

type TargetMarshaled struct {
	Name            string `json:"name"`
	FirmwareVersion string `json:"firmwareVersion"`
	Error           string `json:"error"`
	ImageID         string `json:"imageID"`
	SoftwareId      string `json:"softwareId"`
	TargetName      string `json:"targetName"`
}

func ToTargetMarshaled added in v1.15.0

func ToTargetMarshaled(from []storage.Target) (to []TargetMarshaled)

func (*TargetMarshaled) Equals added in v1.15.0

func (obj *TargetMarshaled) Equals(other TargetMarshaled) (equals bool)

Jump to

Keyboard shortcuts

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