diff options
author | Ritu Sood <Ritu.Sood@intel.com> | 2020-08-14 22:57:11 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-08-14 22:57:11 +0000 |
commit | 6e5ca4741dab0de3b4d89f410f0ff9d0313d6aee (patch) | |
tree | 6f4dbbdf8c13944cf5b95d2d59fd565ebee778b9 /src/orchestrator/pkg/state/types.go | |
parent | 6e671649f67e9bbe2ebdea18efa18e9c2c506946 (diff) | |
parent | 709d6d17a3b2f8bc9d46034295bd7c5a7fb76107 (diff) |
Merge "Add appcontext state, status and resource status"
Diffstat (limited to 'src/orchestrator/pkg/state/types.go')
-rw-r--r-- | src/orchestrator/pkg/state/types.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/orchestrator/pkg/state/types.go b/src/orchestrator/pkg/state/types.go index 25fb60d2..665a1be4 100644 --- a/src/orchestrator/pkg/state/types.go +++ b/src/orchestrator/pkg/state/types.go @@ -16,16 +16,27 @@ package state +import "time" + // StateInfo struct is used to maintain the values for state, contextid, (and other) // information about resources which can be instantiated via rsync. +// The last Actions entry holds the current state of the container object. type StateInfo struct { + Actions []ActionEntry +} + +// ActionEntry is used to keep track of the time an action (e.g. Created, Instantiate, Terminate) was invoked +// For actions where an AppContext is relevent, the ContextId field will be non-zero length +type ActionEntry struct { State StateValue ContextId string + TimeStamp time.Time } type StateValue = string type states struct { + Undefined StateValue Created StateValue Approved StateValue Applied StateValue @@ -34,6 +45,7 @@ type states struct { } var StateEnum = &states{ + Undefined: "Undefined", Created: "Created", Approved: "Approved", Applied: "Applied", |