From c5d5e14f506a9be6e93003b88f0aed42e5030ebf Mon Sep 17 00:00:00 2001 From: SunilB Date: Mon, 15 Apr 2019 19:52:11 +0530 Subject: Conditional Macro Action Selection Update orchestration_flow_reference table and changes in WorkflowActionBBTasks to Conditionally trigger ConfigAssignVnfBB And ConfigDeployVnfBB building block. Change-Id: I1bdb8a77223aef6855e4e1c9aa80dd026892e6f6 Issue-ID: SO-1702 Signed-off-by: sunilb --- .../java/org/onap/so/db/catalog/client/CatalogDbClient.java | 12 +++++++++++- .../catalog/data/repository/VnfCustomizationRepository.java | 13 +++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'mso-catalog-db/src/main/java') diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java index a2ca4a3814..19200468ae 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java @@ -191,6 +191,7 @@ public class CatalogDbClient { private String findPnfResourceCustomizationByModelUuid = "/findPnfResourceCustomizationByModelUuid"; private String findWorkflowByArtifactUUID = "/findByArtifactUUID"; private String findWorkflowByModelUUID = "/findWorkflowByModelUUID"; + private String findVnfResourceCustomizationByModelUuid = "/findVnfResourceCustomizationByModelUuid"; private String serviceURI; private String vfModuleURI; @@ -333,6 +334,9 @@ public class CatalogDbClient { findWorkflowByArtifactUUID = endpoint + WORKFLOW + SEARCH + findWorkflowByArtifactUUID; findWorkflowByModelUUID = endpoint + WORKFLOW + SEARCH + findWorkflowByModelUUID; + findVnfResourceCustomizationByModelUuid = + endpoint + VNF_RESOURCE_CUSTOMIZATION + SEARCH + findVnfResourceCustomizationByModelUuid; + serviceURI = endpoint + SERVICE + URI_SEPARATOR; vfModuleURI = endpoint + VFMODULE + URI_SEPARATOR; vnfResourceURI = endpoint + VNF_RESOURCE + URI_SEPARATOR; @@ -503,6 +507,12 @@ public class CatalogDbClient { } } + public List getVnfResourceCustomizationByModelUuid(String modelUuid) { + return this.getMultipleResources(vnfResourceCustomizationClient, + getUri(UriBuilder.fromUri(findVnfResourceCustomizationByModelUuid) + .queryParam("SERVICE_MODEL_UUID", modelUuid).build().toString())); + } + public PnfResource getPnfResourceByModelUUID(String modelUUID) { PnfResource PnfResource = this.getSingleResource(pnfResourceClient, getUri(pnfResourceURI + modelUUID)); if (PnfResource != null) { @@ -816,7 +826,7 @@ public class CatalogDbClient { return vfModuleCust.getCvnfcCustomization().stream().collect(Collectors.toList()); } - private VnfResourceCustomization findVnfResourceCustomizationInList(String vnfCustomizationUUID, + public VnfResourceCustomization findVnfResourceCustomizationInList(String vnfCustomizationUUID, List vnfResourceCusts) { List filtered = vnfResourceCusts.stream() .filter(vnfCustRes -> vnfCustomizationUUID.equals(vnfCustRes.getModelCustomizationUUID())) diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepository.java index c72fade411..c38ffcbbf3 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepository.java @@ -40,4 +40,17 @@ public interface VnfCustomizationRepository extends JpaRepository findVnfResourceCustomizationByModelUuid( + @Param("SERVICE_MODEL_UUID") String serviceModelUuid); + } -- cgit 1.2.3-korg