summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogic.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java7
2 files changed, 8 insertions, 1 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogic.java
index a10bae9c1e..32fdffe1b4 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogic.java
@@ -140,7 +140,7 @@ public class ComponentInterfaceOperationBusinessLogic extends BaseBusinessLogic
final OperationDataDefinition updatedOperationDataDefinition = optionalOperationDataDefinition.get();
final Optional<ComponentInstanceInterface> optionalComponentInstanceInterface = componentInstanceInterfaceList.stream().filter(
ci -> ci.getOperations().values().stream().anyMatch(
- operationDataDefinition -> operationDataDefinition.getUniqueId().equalsIgnoreCase(updatedOperationDataDefinition.getUniqueId())))
+ operationDataDefinition -> operationDataDefinition.getName().equalsIgnoreCase(updatedOperationDataDefinition.getName())))
.findFirst();
if (optionalComponentInstanceInterface.isEmpty()) {
responseFormat = componentsUtils.getResponseFormat(ActionStatus.INTERFACE_NOT_FOUND_IN_COMPONENT);
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java
index 1dd7f40730..42cf3f21d0 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java
@@ -133,6 +133,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
artifactDataDefinition.setArtifactName("EO Implementation info");
operationDataDefinition.setImplementation(artifactDataDefinition);
@@ -180,6 +181,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
final ListDataDefinition<OperationInputDefinition> inputsDefinitionListData = new ListDataDefinition<>();
OperationInputDefinition input1 = new OperationInputDefinition();
@@ -238,6 +240,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
final ListDataDefinition<OperationInputDefinition> inputsDefinitionListData = new ListDataDefinition<>();
OperationInputDefinition input1 = new OperationInputDefinition();
@@ -299,6 +302,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
artifactDataDefinition.setArtifactName("EO Implementation info");
@@ -364,6 +368,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
artifactDataDefinition.setArtifactName("EO Implementation info");
@@ -429,6 +434,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
artifactDataDefinition.setArtifactName("EO Implementation info");
operationDataDefinition.setImplementation(artifactDataDefinition);
@@ -468,6 +474,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
artifactDataDefinition.setArtifactName("EO Implementation info");
operationDataDefinition.setImplementation(artifactDataDefinition);