aboutsummaryrefslogtreecommitdiffstats
path: root/src/orchestrator/pkg/module/instantiation.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/orchestrator/pkg/module/instantiation.go')
-rw-r--r--src/orchestrator/pkg/module/instantiation.go20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/orchestrator/pkg/module/instantiation.go b/src/orchestrator/pkg/module/instantiation.go
index d7ec663d..27990cee 100644
--- a/src/orchestrator/pkg/module/instantiation.go
+++ b/src/orchestrator/pkg/module/instantiation.go
@@ -30,7 +30,7 @@ import (
const ManifestFileName = "manifest.yaml"
// GenericPlacementIntentName denotes the generic placement intent name
-const GenericPlacementIntentName = "generic-placement-intent"
+const GenericPlacementIntentName = "genericPlacementIntent"
// SEPARATOR used while creating clusternames to store in etcd
const SEPARATOR = "+"
@@ -100,22 +100,18 @@ and returns the name of the genericPlacementIntentName. Returns empty value if s
*/
func findGenericPlacementIntent(p, ca, v, di string) (string, error) {
var gi string
- var found bool
iList, err := NewIntentClient().GetAllIntents(p, ca, v, di)
if err != nil {
return gi, err
}
for _, eachMap := range iList.ListOfIntents {
if gi, found := eachMap[GenericPlacementIntentName]; found {
- log.Info(":: Name of the generic-placement-intent ::", log.Fields{"GenPlmtIntent": gi})
- return gi, err
+ log.Info(":: Name of the generic-placement-intent found ::", log.Fields{"GenPlmtIntent": gi})
+ return gi, nil
}
}
- if found == false {
- fmt.Println("generic-placement-intent not found !")
- }
+ log.Info(":: generic-placement-intent not found ! ::", log.Fields{"Searched for GenPlmtIntent": GenericPlacementIntentName})
return gi, pkgerrors.New("Generic-placement-intent not found")
-
}
// GetSortedTemplateForApp returns the sorted templates.
@@ -277,6 +273,14 @@ func (c InstantiationClient) Instantiate(p string, ca string, v string, di strin
}
// END:: save the context in the orchestrator db record
+ // BEGIN: scheduler code
+
+ pl, mapOfControllers, err := getPrioritizedControllerList(p, ca, v, di)
+ log.Info("Priority Based List ", log.Fields{"PlacementControllers::": pl.pPlaCont,
+ "ActionControllers::": pl.pActCont, "mapOfControllers::": mapOfControllers})
+
+ // END: Scheduler code
+
log.Info(":: Done with instantiation... ::", log.Fields{"CompositeAppName": ca})
return err
}