aboutsummaryrefslogtreecommitdiffstats
path: root/src/orchestrator/pkg/gpic/gpic.go
diff options
context:
space:
mode:
authorRajamohan Raj <rajamohan.raj@intel.com>2020-04-30 23:07:15 +0000
committerRajamohan Raj <rajamohan.raj@intel.com>2020-05-12 19:47:41 +0000
commit8fd7fd2ba9db1fb2dbe22c0cf89edb80454cff6d (patch)
tree867d42e86073a5b3ca3917096e8f99f8f791d448 /src/orchestrator/pkg/gpic/gpic.go
parent8e0c00c4c59add2fa03a67081d74cd46934d034e (diff)
Create appContext and save to etcd
In this patch, following tasks are accomplished 1. Creation of appContext and storing the appcontexts for each app in the compositeApp into etcd as part of the instantiation process 2. Added a util method to extract parameters from k8s manifest files. 3. Added a new testing script to auto create NCM artifacts through the NCM APIs 4. Modified the existing plugin_collection_v2.sh to better test the orchestrator APIs. 5. Added logging to appcontext lib 6. Bug fix in the helm charts. Issue-ID: MULTICLOUD-1064 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I1b0e4d1351ad3a083be529239748015ea5db2a41
Diffstat (limited to 'src/orchestrator/pkg/gpic/gpic.go')
-rw-r--r--src/orchestrator/pkg/gpic/gpic.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/orchestrator/pkg/gpic/gpic.go b/src/orchestrator/pkg/gpic/gpic.go
index f02e5352..256d3b41 100644
--- a/src/orchestrator/pkg/gpic/gpic.go
+++ b/src/orchestrator/pkg/gpic/gpic.go
@@ -22,14 +22,14 @@ package gpic
*/
import (
- "log"
ncmmodule "github.com/onap/multicloud-k8s/src/ncm/pkg/module"
pkgerrors "github.com/pkg/errors"
+ "log"
)
// Clusters has 1 field - a list of ClusterNames
type Clusters struct {
- ClustersWithName []ClusterWithName
+ ClustersWithName []ClusterWithName
}
// ClusterWithName has two fields - ProviderName and ClusterName
@@ -82,7 +82,7 @@ func intentResolverHelper(pn, cn, cln string, clustersWithName []ClusterWithName
for _, eachClusterName := range clusterNamesList {
eachClusterWithPN := ClusterWithName{pn, eachClusterName}
clustersWithName = append(clustersWithName, eachClusterWithPN)
- log.Printf("Added Cluster: %s ", cln)
+ log.Printf("Added Cluster :: %s through its label: %s ", eachClusterName, cln)
}
}
return clustersWithName, nil
@@ -95,13 +95,13 @@ func IntentResolver(intent IntentStruc) (Clusters, error) {
for _, eachAllOf := range intent.AllOfArray {
clustersWithName, err = intentResolverHelper(eachAllOf.ProviderName, eachAllOf.ClusterName, eachAllOf.ClusterLabelName, clustersWithName)
- if err!=nil {
+ if err != nil {
return Clusters{}, pkgerrors.Wrap(err, "intentResolverHelper error")
}
if len(eachAllOf.AnyOfArray) > 0 {
for _, eachAnyOf := range eachAllOf.AnyOfArray {
clustersWithName, err = intentResolverHelper(eachAnyOf.ProviderName, eachAnyOf.ClusterName, eachAnyOf.ClusterLabelName, clustersWithName)
- if err!=nil {
+ if err != nil {
return Clusters{}, pkgerrors.Wrap(err, "intentResolverHelper error")
}
}
@@ -110,7 +110,7 @@ func IntentResolver(intent IntentStruc) (Clusters, error) {
if len(intent.AnyOfArray) > 0 {
for _, eachAnyOf := range intent.AnyOfArray {
clustersWithName, err = intentResolverHelper(eachAnyOf.ProviderName, eachAnyOf.ClusterName, eachAnyOf.ClusterLabelName, clustersWithName)
- if err!=nil {
+ if err != nil {
return Clusters{}, pkgerrors.Wrap(err, "intentResolverHelper error")
}
}