summaryrefslogtreecommitdiffstats
path: root/mso-catalog-db
diff options
context:
space:
mode:
Diffstat (limited to 'mso-catalog-db')
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java8
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java4
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java3
3 files changed, 8 insertions, 7 deletions
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 015a063024..cf066f9721 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
@@ -203,7 +203,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";
@@ -345,7 +345,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;
@@ -1069,8 +1069,8 @@ public class CatalogDbClient {
.queryParam(ARTIFACT_UUID, artifactUUID).build().toString()));
}
- public List<Workflow> findWorkflowByModelUUID(String vnfResourceModelUUID) {
- return this.getMultipleResources(workflowClient, getUri(UriBuilder.fromUri(findWorkflowByModelUUID)
+ public List<Workflow> 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<Workflow, Integer> {
* 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<Workflow> findWorkflowByModelUUID(String vnfResourceModelUUID);
+ List<Workflow> findWorkflowByVnfModelUUID(String vnfResourceModelUUID);
/**
* Used to fetch the @{link Workflow} by the Pnf Model UUID.
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java
index 7d1b8d0d96..b07e82b8a8 100644
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java
@@ -36,7 +36,8 @@ public class WorkflowRepositoryTest extends BaseTest {
@Test
public void findByVnfResourceModelUUIDTest() throws Exception {
- List<Workflow> workflows = workflowRepository.findWorkflowByModelUUID("ff2ae348-214a-11e7-93ae-92361f002671");
+ List<Workflow> workflows =
+ workflowRepository.findWorkflowByVnfModelUUID("ff2ae348-214a-11e7-93ae-92361f002671");
Assert.assertTrue(workflows != null);
Assert.assertTrue(workflows.size() != 0);