From bba9db24305b78214fd9f415d2ab4d7455ee762c Mon Sep 17 00:00:00 2001 From: Yaoguang Wang Date: Thu, 13 Feb 2020 17:41:38 +0800 Subject: extend query parameter to support pnfModelVersionId Issue-ID: SO-2559 Signed-off-by: Yaoguang Wang Change-Id: I51cb15f6750b378a9de3435951e3ea1644184a55 --- .../main/java/org/onap/so/db/catalog/client/CatalogDbClient.java | 8 ++++---- .../onap/so/db/catalog/data/repository/WorkflowRepository.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'mso-catalog-db/src/main') 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 161ca2a2fb..4090e19d34 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 @@ -201,7 +201,7 @@ public class CatalogDbClient { private String findServiceByServiceInstanceId = "/findServiceByServiceInstanceId"; private String findPnfResourceCustomizationByModelUuid = "/findPnfResourceCustomizationByModelUuid"; private String findWorkflowByArtifactUUID = "/findByArtifactUUID"; - private String findWorkflowByModelUUID = "/findWorkflowByModelUUID"; + private String findWorkflowByVnfModelUUID = "/findWorkflowByVnfModelUUID"; private String findWorkflowByPnfModelUUID = "/findWorkflowByPnfModelUUID"; private String findWorkflowBySource = "/findBySource"; private String findVnfResourceCustomizationByModelUuid = "/findVnfResourceCustomizationByModelUuid"; @@ -339,7 +339,7 @@ public class CatalogDbClient { endpoint + PNF_RESOURCE_CUSTOMIZATION + SEARCH + findPnfResourceCustomizationByModelUuid; findWorkflowByArtifactUUID = endpoint + WORKFLOW + SEARCH + findWorkflowByArtifactUUID; - findWorkflowByModelUUID = endpoint + WORKFLOW + SEARCH + findWorkflowByModelUUID; + findWorkflowByVnfModelUUID = endpoint + WORKFLOW + SEARCH + findWorkflowByVnfModelUUID; findWorkflowByPnfModelUUID = endpoint + WORKFLOW + SEARCH + findWorkflowByPnfModelUUID; findWorkflowBySource = endpoint + WORKFLOW + SEARCH + findWorkflowBySource; @@ -1049,8 +1049,8 @@ public class CatalogDbClient { .queryParam(ARTIFACT_UUID, artifactUUID).build().toString())); } - public List findWorkflowByModelUUID(String vnfResourceModelUUID) { - return this.getMultipleResources(workflowClient, getUri(UriBuilder.fromUri(findWorkflowByModelUUID) + public List findWorkflowByVnfModelUUID(String vnfResourceModelUUID) { + return this.getMultipleResources(workflowClient, getUri(UriBuilder.fromUri(findWorkflowByVnfModelUUID) .queryParam(VNF_RESOURCE_MODEL_UUID, vnfResourceModelUUID).build().toString())); } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java index f1b399325e..91c6940e95 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java @@ -37,14 +37,14 @@ public interface WorkflowRepository extends JpaRepository { * Used to fetch the @{link Workflow} by the Model UUID. * * This operation is required by {@link org.onap.so.db.catalog.client.CatalogDbClient} to provide Workflow based on - * model UUID without projection. + * vnf model UUID without projection. * * @param vnfResourceModelUUID UUID * @return List of Workflow */ @Query(value = "select b.* from vnf_resource_to_workflow a join workflow b where a.WORKFLOW_ID = b.ID and a.VNF_RESOURCE_MODEL_UUID = ?1", nativeQuery = true) - List findWorkflowByModelUUID(String vnfResourceModelUUID); + List findWorkflowByVnfModelUUID(String vnfResourceModelUUID); /** * Used to fetch the @{link Workflow} by the Pnf Model UUID. -- cgit 1.2.3-korg