aboutsummaryrefslogtreecommitdiffstats
path: root/src/orchestrator/pkg/module/instantiation_scheduler_helper.go
diff options
context:
space:
mode:
authorEric Multanen <eric.w.multanen@intel.com>2020-07-02 15:34:13 -0700
committerEric Multanen <eric.w.multanen@intel.com>2020-07-08 14:17:06 -0700
commit0af31b5e508faa227a36e687346e7905a7a10ed6 (patch)
tree3a1f0e7565f8ce699f094167009cc68db7e16ad8 /src/orchestrator/pkg/module/instantiation_scheduler_helper.go
parente06b947b03c3fcce2c954feb68890a519c7740c3 (diff)
Add terminate support to orchestrator and ncm
Complete the basic terminate support for the orchestrator and ncm services. 1. When terminate REST API is invoked on a deployment intent group, call the uninstall grpc api to rsync and then remove the app context. 2. When terminate REST API is invoked on a cluster, add the uninstall grpc api call to rsync to remove the network resources from the clusters. Issue-ID: MULTICLOUD-1040 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: I181e891a8c7c973970af061f9ff07d80c3bb64f9
Diffstat (limited to 'src/orchestrator/pkg/module/instantiation_scheduler_helper.go')
-rw-r--r--src/orchestrator/pkg/module/instantiation_scheduler_helper.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/orchestrator/pkg/module/instantiation_scheduler_helper.go b/src/orchestrator/pkg/module/instantiation_scheduler_helper.go
index 3d9d851c..184d6972 100644
--- a/src/orchestrator/pkg/module/instantiation_scheduler_helper.go
+++ b/src/orchestrator/pkg/module/instantiation_scheduler_helper.go
@@ -192,9 +192,9 @@ func callGrpcForControllerList(cl []controller.Controller, mc map[string]string,
}
/*
-callRsync method shall take in the app context id and invokes the rsync service via grpc
+callRsyncInstall method shall take in the app context id and invokes the rsync service via grpc
*/
-func callRsync(contextid interface{}) error {
+func callRsyncInstall(contextid interface{}) error {
appContextID := fmt.Sprintf("%v", contextid)
err := rsyncclient.InvokeInstallApp(appContextID)
if err != nil {
@@ -204,6 +204,18 @@ func callRsync(contextid interface{}) error {
}
/*
+callRsyncUninstall method shall take in the app context id and invokes the rsync service via grpc
+*/
+func callRsyncUninstall(contextid interface{}) error {
+ appContextID := fmt.Sprintf("%v", contextid)
+ err := rsyncclient.InvokeUninstallApp(appContextID)
+ if err != nil {
+ return err
+ }
+ return nil
+}
+
+/*
deleteExtraClusters method shall delete the extra cluster handles for each AnyOf cluster present in the etcd after the grpc call for context updation.
*/
func deleteExtraClusters(apps []App, ct appcontext.AppContext) error {