summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajamohan Raj <rajamohan.raj@intel.com>2020-04-17 20:51:36 +0000
committerRajamohan Raj <rajamohan.raj@intel.com>2020-04-17 20:51:36 +0000
commit1c3a22e3de0dd24b4161ae8b34794627620a208b (patch)
tree8135daea47a910aa642402441cd877f9e306c44d
parentc898a84208d20f0040778450cc401a35c3f8ee41 (diff)
Remove orchestrator dependency from ncm
NCM shall be like a library which orchestrator shall call as and when required. NCM will assume that whenever orchestrator calls it all the validation of orchestrator components is done, so NCM shall not validate orchestrator components. Otherwise, if NCM calls the orchestration, this will result in cyclic import issue. Issue-ID: MULTICLOUD-1041 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: Ie352c730ffd39863d6de23d6a9a9a934f460392b
-rw-r--r--src/ncm/pkg/module/netcontrolintent.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/ncm/pkg/module/netcontrolintent.go b/src/ncm/pkg/module/netcontrolintent.go
index e94dd9db..5ef9dffe 100644
--- a/src/ncm/pkg/module/netcontrolintent.go
+++ b/src/ncm/pkg/module/netcontrolintent.go
@@ -18,7 +18,7 @@ package module
import (
"github.com/onap/multicloud-k8s/src/orchestrator/pkg/infra/db"
- orchestrator "github.com/onap/multicloud-k8s/src/orchestrator/pkg/module"
+
pkgerrors "github.com/pkg/errors"
)
@@ -72,14 +72,8 @@ func (v *NetControlIntentClient) CreateNetControlIntent(nci NetControlIntent, pr
CompositeAppVersion: compositeappversion,
}
- //Check if composite app/version exists
- _, err := orchestrator.NewCompositeAppClient().GetCompositeApp(compositeapp, compositeappversion, project)
- if err != nil {
- return NetControlIntent{}, pkgerrors.New("Unable to find the composite app/version")
- }
-
//Check if this NetControlIntent already exists
- _, err = v.GetNetControlIntent(nci.Metadata.Name, project, compositeapp, compositeappversion)
+ _, err := v.GetNetControlIntent(nci.Metadata.Name, project, compositeapp, compositeappversion)
if err == nil && !exists {
return NetControlIntent{}, pkgerrors.New("NetControlIntent already exists")
}