Documentation
¶
Overview ¶
Package entity defines constants required to communicate the state and associated events of a virtual entity to the VRS. A virtual entity represents either a VM or a container and is identified by a UUID.
Index ¶
Constants ¶
const ( VM = 0 Host = 1 Bridge = 2 VMBridge = 3 Container = 4 )
Different types of entities
Variables ¶
This section is empty.
Functions ¶
func ValidateEvent ¶
func ValidateEvent(eventCategory EventCategory, event Event) bool
ValidateEvent validates the event type given it's category
Types ¶
type EntityEvents ¶
type EntityEvents struct { EntityEventCategory EventCategory EntityEventType Event EntityState State EntityReason SubState }
EntityEvents contains state description of an event
type Event ¶
type Event int
Event identifies a specific Entity event for an EventCategory
Defined events
const ( EventStartedBooted Event = 0 EventStartedMigrated Event = 1 EventStartedRestored Event = 2 EventStartedFromSnapshot Event = 3 EventStartedWakeup Event = 4 EventStartedLast Event = 5 )
Start events
const ( EventSuspendedPaused Event = 0 EventSuspendedMigrated Event = 1 EventSuspendedIOError Event = 2 EventSuspendedWatchdog Event = 3 EventSuspendedRestored Event = 4 EventSuspendedFromSnapshot Event = 5 EventSuspendedAPIError Event = 6 EventSuspendedLast Event = 7 )
Suspend events
const ( EventResumedUnpaused Event = 0 EventResumedMigrated Event = 1 EventResumedFromSnapshot Event = 2 EventResumedLast Event = 3 )
Resume events
type EventCategory ¶
type EventCategory int
EventCategory represents different types of events that can be associated with an Entity
const ( EventCategoryDefined EventCategory = 0 EventCategoryUndefined EventCategory = 1 EventCategoryStarted EventCategory = 2 EventCategorySuspended EventCategory = 3 EventCategoryResumed EventCategory = 4 EventCategoryStopped EventCategory = 5 EventCategoryShutdown EventCategory = 6 EventCategoryPmsuspended EventCategory = 7 EventCategoryStarting EventCategory = 10 )
Categories of events supported by Nuage Entity
type MetadataKey ¶
type MetadataKey string
MetadataKey identifies metadata keys for a Nuage entity
const ( MetadataKeyEnterprise MetadataKey = "enterprise" MetadataKeyUser MetadataKey = "user" MetadataKeyOrchestrationID MetadataKey = "nuage-orchestrationID" MetadataKeySiteID MetadataKey = "nuage-siteID" MetadataKeyDeleteMode MetadataKey = "nuage-delete-mode" MetadataKeyDeleteExpiry MetadataKey = "nuage-delete-expiry" MetadataKeyExtension MetadataKey = "nuage-extension" )
Different metadata keys supported for Nuage entity
type SubState ¶
type SubState int
SubState represents possible substates for each of the state
const ( RunningUnknown SubState = 0 RunningBooted SubState = 1 RunningMigrated SubState = 2 RunningRestored SubState = 3 RunningFromSnapshot SubState = 4 RunningUnpaused SubState = 5 RunningMigrationCanceled SubState = 6 RunningSaveCanceled SubState = 7 RunningWakeup SubState = 8 )
Possible sub states for Running state
const ( PausedUnknown SubState = 0 PausedUser SubState = 1 PausedMigration SubState = 2 PausedSave SubState = 3 PausedDump SubState = 4 PausedIoerror SubState = 5 PausedWatchdog SubState = 6 PausedFromSnapshot SubState = 7 PausedShuttingDown SubState = 8 PausedSnapshot SubState = 9 )
Possible sub states for Paused state
Possible sub states for Shutdown state
const ( ShutoffUnknown SubState = 0 ShutoffShutdown SubState = 1 ShutoffDestroyed SubState = 2 ShutoffCrashed SubState = 3 ShutoffMigrated SubState = 4 ShutoffSaved SubState = 5 ShutoffFailed SubState = 6 ShutoffFromSnapshot SubState = 7 )
Possible sub states for Shutoff state
const (
BlockedUnknown SubState = 0
)
Possible sub states for Blocked state
const (
CrashedUnknown SubState = 0
)
Possible sub states for crashed state