...
Code Block | ||||
---|---|---|---|---|
| ||||
func decidePlacementplacement(appContextId string) { var context appcontext.AppContext _, err = context.LoadAppContext(appContextId) if err != nil { return nil } // Get AppContext for an App gmgmap, err := context.GetClusterGroupMap("testApp") } // sample output {"1":["cluster_provider1+clusterName3","cluster_provider1+clusterName5"],"2":["cluster_provider2+clusterName4","cluster_provider2+clusterName6"]} for gr, cl := range gmap { for i, cn := range cl { // Based on the output decide which cluster is not suitable ....... //Delete the cluster not suitable ch, err := ct.GetClusterHandle(an, cn) err = ct.DeleteCluster(ch) } } } |
AppContext API
GoDoc: package appcontext // import "github.com/onap/multicloud-k8s/src/orchestrator/pkg/appcontext"
...