entity

package
v0.0.0-...-d7373f6 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: BSD-3-Clause Imports: 0 Imported by: 7

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

View Source
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 Domain

type Domain int

Domain the different virtualization platforms supported by Nuage

const (
	KVM     Domain = 0
	ESXI    Domain = 1
	Xen     Domain = 2
	HyperV  Domain = 3
	Docker  Domain = 4
	LXC     Domain = 5
	ESXIM   Domain = 6
	QEMU    Domain = 7
	Unknown Domain = 8
)

Constants defining different platforms

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

const (
	EventDefinedAdded   Event = 0
	EventDefinedUpdated Event = 1
	EventDefinedLast    Event = 2
)

Defined events

const (
	EventUndefinedRemoved Event = 0
	EventUndefinedLast    Event = 1
)

Undefined 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

const (
	EventStoppedShutdown     Event = 0
	EventStoppedDestroyed    Event = 1
	EventStoppedCrashed      Event = 2
	EventStoppedMigrated     Event = 3
	EventStoppedSaved        Event = 4
	EventStoppedFailed       Event = 5
	EventStoppedFromSnapshot Event = 6
	EventStoppedLast         Event = 7
)

Stop events

const (
	EventShutdownFinished Event = 0
	EventShutdownLast     Event = 1
)

Shutdown events

const (
	EventPMSuspendedMemory Event = 0
	EventPMSuspendedDisk   Event = 1
	EventPMSuspendedLast   Event = 2
)

PM suspend 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 State

type State int

State represents possible states for the Nuage entity

const (
	NoState     State = 0
	Running     State = 1
	Blocked     State = 2
	Paused      State = 3
	Shutdown    State = 4
	Shutoff     State = 5
	Crashed     State = 6
	PMSuspended State = 7
)

Possible states for an 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

const (
	ShutdownUnknown SubState = 0
	ShutdownUser    SubState = 1
)

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

type Type

type Type int

Type defines the different types of entity

Jump to

Keyboard shortcuts

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