From 6452065eb2d3b2f0926d16499e0ecedec2382422 Mon Sep 17 00:00:00 2001 From: Manjunath Ranganathaiah Date: Fri, 7 Aug 2020 19:06:22 +0000 Subject: Changes to add state and retry logic to rsync - Adds retry watcher and related functionality. - Adds code to update, get the status from appcontext. - Adds logic to handle state transition during terminate. Issue-ID: MULTICLOUD-1005 Signed-off-by: Manjunath Ranganathaiah Change-Id: I2ed76efd9d8b6f40fec547bbe8b7d8a86f69ce07 --- src/orchestrator/pkg/appcontext/appcontext.go | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/orchestrator/pkg/appcontext') diff --git a/src/orchestrator/pkg/appcontext/appcontext.go b/src/orchestrator/pkg/appcontext/appcontext.go index db2ba432..5d757940 100644 --- a/src/orchestrator/pkg/appcontext/appcontext.go +++ b/src/orchestrator/pkg/appcontext/appcontext.go @@ -37,30 +37,30 @@ type AppContext struct { // AppContextStatus represents the current status of the appcontext // Instantiating - instantiate has been invoked and is still in progress // Instantiated - instantiate has completed -// PreTerminate - terminate has been invoked when in Instantiating status - need to clean up first // Terminating - terminate has been invoked and is still in progress // Terminated - terminate has completed -// Failed - the instantiate or terminate action has failed +// InstantiateFailed - the instantiate action has failed +// TerminateFailed - the terminate action has failed type AppContextStatus struct { Status StatusValue } type StatusValue string type statuses struct { - Instantiating StatusValue - Instantiated StatusValue - PreTerminate StatusValue - Terminating StatusValue - Terminated StatusValue - Failed StatusValue + Instantiating StatusValue + Instantiated StatusValue + Terminating StatusValue + Terminated StatusValue + InstantiateFailed StatusValue + TerminateFailed StatusValue } var AppContextStatusEnum = &statuses{ - Instantiating: "Instantiating", - Instantiated: "Instantiated", - PreTerminate: "PreTerminate", - Terminating: "Terminating", - Terminated: "Terminated", - Failed: "Failed", + Instantiating: "Instantiating", + Instantiated: "Instantiated", + Terminating: "Terminating", + Terminated: "Terminated", + InstantiateFailed: "InstantiateFailed", + TerminateFailed: "TerminateFailed", } // CompositeAppMeta consists of projectName, CompositeAppName, -- cgit 1.2.3-korg