summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/main
diff options
context:
space:
mode:
authordavsad <david.sadlier@est.tech>2021-07-24 19:40:56 +0100
committerMichael Morris <michael.morris@est.tech>2021-08-06 15:22:51 +0000
commit0ed125f98ae8ea9e80c855a640c328654660d081 (patch)
tree2ff63490ba093726164a1199aeef6605bb3652ff /catalog-model/src/main
parent84aa83e9203d6f890cc5f425a00ac748d47c5c8f (diff)
Consider component model when retrieving interface types
Issue-ID: SDC-3414 Signed-off-by: davsad <david.sadlier@est.tech> Change-Id: Ie16a2604cfdff042e32bfa4f9a3a509b5da22226
Diffstat (limited to 'catalog-model/src/main')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/IInterfaceLifecycleOperation.java7
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/InterfaceLifecycleOperation.java4
2 files changed, 7 insertions, 4 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/IInterfaceLifecycleOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/IInterfaceLifecycleOperation.java
index 6783fcda13..a30405527f 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/IInterfaceLifecycleOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/IInterfaceLifecycleOperation.java
@@ -19,12 +19,14 @@
*/
package org.openecomp.sdc.be.model.operations.api;
-import fj.data.Either;
import java.util.Map;
+
import org.openecomp.sdc.be.datatypes.elements.InterfaceDataDefinition;
import org.openecomp.sdc.be.model.InterfaceDefinition;
import org.openecomp.sdc.be.model.Operation;
+import fj.data.Either;
+
public interface IInterfaceLifecycleOperation {
public Either<InterfaceDefinition, StorageOperationStatus> createInterfaceOnResource(InterfaceDefinition interf, String resourceId,
@@ -56,5 +58,6 @@ public interface IInterfaceLifecycleOperation {
public String getShortInterfaceName(InterfaceDataDefinition interfaceDefinition);
- Either<Map<String, InterfaceDefinition>, StorageOperationStatus> getAllInterfaceLifecycleTypes();
+ Either<Map<String, InterfaceDefinition>, StorageOperationStatus> getAllInterfaceLifecycleTypes(final String model);
+
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/InterfaceLifecycleOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/InterfaceLifecycleOperation.java
index 3fa1f8933d..9299aec7e0 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/InterfaceLifecycleOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/InterfaceLifecycleOperation.java
@@ -850,9 +850,9 @@ public class InterfaceLifecycleOperation implements IInterfaceLifecycleOperation
}
@Override
- public Either<Map<String, InterfaceDefinition>, StorageOperationStatus> getAllInterfaceLifecycleTypes() {
+ public Either<Map<String, InterfaceDefinition>, StorageOperationStatus> getAllInterfaceLifecycleTypes(final String model) {
Either<List<InterfaceData>, JanusGraphOperationStatus> allInterfaceLifecycleTypes = janusGraphGenericDao
- .getByCriteria(NodeTypeEnum.Interface, Collections.emptyMap(), InterfaceData.class);
+ .getByCriteriaForModel(NodeTypeEnum.Interface, Collections.emptyMap(), model, InterfaceData.class);
if (allInterfaceLifecycleTypes.isRight()) {
return Either.right(DaoStatusConverter.convertJanusGraphStatusToStorageStatus(allInterfaceLifecycleTypes.right().value()));
}