diff options
author | Eric Multanen <eric.w.multanen@intel.com> | 2020-06-23 12:23:30 -0700 |
---|---|---|
committer | Ritu Sood <Ritu.Sood@intel.com> | 2020-06-26 19:49:03 +0000 |
commit | d972a4453774410868ba48494a80e84232704fe2 (patch) | |
tree | 68897029126c548498b34568302b7317e7ea38bd /src/orchestrator/pkg/module/instantiation_scheduler_helper.go | |
parent | 8b5fefd9d4e54c3dab7f626e084359800c155b92 (diff) |
Add instruction and rsync call to instantiate
This patch adds app and resource 'order' and 'dependency'
instructions to the appcontext, as these are currently
expected by rsync.
Adds the rsync client and call to rsync to instantiate the
appcontext.
Issue-ID: MULTICLOUD-1064
Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
Change-Id: Iae0da9de4a0ae82bd3ab7ccc72da4abf8b7f2295
Diffstat (limited to 'src/orchestrator/pkg/module/instantiation_scheduler_helper.go')
-rw-r--r-- | src/orchestrator/pkg/module/instantiation_scheduler_helper.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/orchestrator/pkg/module/instantiation_scheduler_helper.go b/src/orchestrator/pkg/module/instantiation_scheduler_helper.go index e4bbbfac..3d9d851c 100644 --- a/src/orchestrator/pkg/module/instantiation_scheduler_helper.go +++ b/src/orchestrator/pkg/module/instantiation_scheduler_helper.go @@ -23,6 +23,7 @@ import ( "github.com/onap/multicloud-k8s/src/orchestrator/pkg/appcontext" client "github.com/onap/multicloud-k8s/src/orchestrator/pkg/grpc/contextupdateclient" + rsyncclient "github.com/onap/multicloud-k8s/src/orchestrator/pkg/grpc/installappclient" log "github.com/onap/multicloud-k8s/src/orchestrator/pkg/infra/logutils" "github.com/onap/multicloud-k8s/src/orchestrator/pkg/module/controller" mtypes "github.com/onap/multicloud-k8s/src/orchestrator/pkg/module/types" @@ -191,6 +192,18 @@ 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 +*/ +func callRsync(contextid interface{}) error { + appContextID := fmt.Sprintf("%v", contextid) + err := rsyncclient.InvokeInstallApp(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 { |