diff options
author | Rajamohan Raj <rajamohan.raj@intel.com> | 2020-06-07 22:42:04 +0000 |
---|---|---|
committer | Rajamohan Raj <rajamohan.raj@intel.com> | 2020-06-07 22:52:37 +0000 |
commit | 1e5858f4ab510acd71272a53cfddce8d945daad0 (patch) | |
tree | 5d0542eeed2ac8e07f374066fc3ab766d0238cd3 /src/orchestrator/pkg/module/instantiation.go | |
parent | 82ec0fbda9ab2090fea542403221be853332e003 (diff) |
Make GRPC calls and delete extra cluster handles
The patch makes grpc calls for context updation
for a given list of controllers and deletes the
extra set of cluster handles for each anyOf
cluster after context updation
Issue-ID: MULTICLOUD-1064
Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com>
Change-Id: I4b946f5f130300628ef4f655213639a2444be2cc
Diffstat (limited to 'src/orchestrator/pkg/module/instantiation.go')
-rw-r--r-- | src/orchestrator/pkg/module/instantiation.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/orchestrator/pkg/module/instantiation.go b/src/orchestrator/pkg/module/instantiation.go index 27990cee..76be2a2d 100644 --- a/src/orchestrator/pkg/module/instantiation.go +++ b/src/orchestrator/pkg/module/instantiation.go @@ -276,11 +276,32 @@ func (c InstantiationClient) Instantiate(p string, ca string, v string, di strin // BEGIN: scheduler code pl, mapOfControllers, err := getPrioritizedControllerList(p, ca, v, di) + if err != nil { + return err + } log.Info("Priority Based List ", log.Fields{"PlacementControllers::": pl.pPlaCont, "ActionControllers::": pl.pActCont, "mapOfControllers::": mapOfControllers}) + err = callGrpcForControllerList(pl.pPlaCont, mapOfControllers, ctxval) + if err != nil { + return err + } + + err = deleteExtraClusters(allApps, context) + if err != nil { + return err + } + + err = callGrpcForControllerList(pl.pActCont, mapOfControllers, ctxval) + if err != nil { + return err + } + // END: Scheduler code + // BEGIN : Rsync code + // END : Rsyc code + log.Info(":: Done with instantiation... ::", log.Fields{"CompositeAppName": ca}) return err } |