diff options
author | Ritu Sood <Ritu.Sood@intel.com> | 2020-05-14 00:05:49 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-05-14 00:05:49 +0000 |
commit | 22a56b401408ad2d3f0d77c245cc2c69df83e456 (patch) | |
tree | 7cdb3873c7a6f485c3bebd24843f24bc4d0aaac3 /src/orchestrator/pkg/gpic | |
parent | a08968c161b999238cbd61ea2eb9fd597a5b37e6 (diff) | |
parent | 8fd7fd2ba9db1fb2dbe22c0cf89edb80454cff6d (diff) |
Merge "Create appContext and save to etcd"
Diffstat (limited to 'src/orchestrator/pkg/gpic')
-rw-r--r-- | src/orchestrator/pkg/gpic/gpic.go | 12 |
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") } } |