From 1e5858f4ab510acd71272a53cfddce8d945daad0 Mon Sep 17 00:00:00 2001 From: Rajamohan Raj Date: Sun, 7 Jun 2020 22:42:04 +0000 Subject: 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 Change-Id: I4b946f5f130300628ef4f655213639a2444be2cc --- src/orchestrator/pkg/module/instantiation.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/orchestrator/pkg/module/instantiation.go') 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 } -- cgit 1.2.3-korg