diff options
Diffstat (limited to 'bpmn')
2 files changed, 31 insertions, 24 deletions
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java index 5b095a9983..1cd8295fa2 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java +++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java @@ -43,6 +43,7 @@ import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceIn import org.onap.so.BaseBPMNTest; import org.onap.so.GrpcNettyServer; import org.onap.so.bpmn.mock.FileUtil; +import org.onap.so.client.aai.AAIVersion; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -60,7 +61,7 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest { private static final int DMAAP_DELAY_TIME_MS = 2000; private static final String TEST_PROCESSINSTANCE_KEY = "CreateVcpeResCustService_simplified"; - + private static final AAIVersion VERSION = AAIVersion.LATEST; private String testBusinessKey; private String requestObject; private String responseObject; @@ -230,7 +231,8 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest { String aaiResponse = "{\n" + " \"results\": [\n" + " {\n" + " \"resource-type\": \"service-instance\",\n" - + " \"resource-link\": \"https://localhost:8443/aai/v15/business/customers/customer/ADemoCustomerInCiti/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/key3\"\n" + + " \"resource-link\": \"https://localhost:8443/aai/" + VERSION + + "/business/customers/customer/ADemoCustomerInCiti/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/key3\"\n" + " }\n" + " ]\n" + "}"; String aaiPnfEntry = "{ \n" + " \"pnf-name\":\"PNFDemo\",\n" + " \"pnf-id\":\"testtest\",\n" @@ -240,52 +242,55 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest { /** * Get the AAI entry for globalCustomerId as specified in the request file. */ - wireMockServer.stubFor( - get(urlPathMatching("/aai/v15/business/customers/customer/ADemoCustomerInCiti.*")).willReturn(ok())); + wireMockServer + .stubFor(get(urlPathMatching("/aai/" + VERSION + "/business/customers/customer/ADemoCustomerInCiti.*")) + .willReturn(ok())); /** * PUT the service to AAI with globalCustomerId, service type as specified in the request file. Service instance * id is generated during runtime, REGEX is used to represent the information. */ - wireMockServer.stubFor(put(urlPathMatching( - "/aai/v15/business/customers/customer/ADemoCustomerInCiti/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/.*"))); + wireMockServer.stubFor(put(urlPathMatching("/aai/" + VERSION + + "/business/customers/customer/ADemoCustomerInCiti/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/.*"))); - wireMockServer.stubFor(get(urlPathMatching( - "/aai/v15/business/customers/customer/ADemoCustomerInCiti/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/.*")) + wireMockServer.stubFor(get(urlPathMatching("/aai/" + VERSION + + "/business/customers/customer/ADemoCustomerInCiti/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/.*")) .willReturn(okJson(aaiResponse))); /** * Get the service from AAI */ - wireMockServer.stubFor(get(urlPathMatching("/aai/v15/nodes/service-instances/service-instance/.*")) + wireMockServer.stubFor(get(urlPathMatching("/aai/" + VERSION + "/nodes/service-instances/service-instance/.*")) .willReturn(okJson(aaiResponse))); /** * Put the project as specified in the request file to AAI. */ - wireMockServer.stubFor(put(urlEqualTo("/aai/v15/business/projects/project/Project-Demonstration"))); + wireMockServer.stubFor(put(urlEqualTo("/aai/" + VERSION + "/business/projects/project/Project-Demonstration"))); /** * GET the project as specified in the request file to AAI. */ - wireMockServer.stubFor( - get(urlPathMatching("/aai/v15/business/projects/project/Project-Demonstration")).willReturn(ok())); + wireMockServer + .stubFor(get(urlPathMatching("/aai/" + VERSION + "/business/projects/project/Project-Demonstration")) + .willReturn(ok())); /** * PUT the PNF correlation ID to AAI. */ - wireMockServer.stubFor(put(urlEqualTo("/aai/v15/network/pnfs/pnf/PNFDemo"))); + wireMockServer.stubFor(put(urlEqualTo("/aai/" + VERSION + "/network/pnfs/pnf/PNFDemo"))); /** * Get the PNF entry from AAI. */ - wireMockServer.stubFor(get(urlEqualTo("/aai/v15/network/pnfs/pnf/PNFDemo")).willReturn(okJson(aaiPnfEntry))); + wireMockServer.stubFor( + get(urlEqualTo("/aai/" + VERSION + "/network/pnfs/pnf/PNFDemo")).willReturn(okJson(aaiPnfEntry))); /** * Put the PNF relationship */ - wireMockServer.stubFor(put( - urlEqualTo("/aai/v15/business/projects/project/Project-Demonstration/relationship-list/relationship"))); + wireMockServer.stubFor(put(urlEqualTo("/aai/" + VERSION + + "/business/projects/project/Project-Demonstration/relationship-list/relationship"))); } /** diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasksIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasksIT.java index 8328e0e08b..21b472b0f3 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasksIT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasksIT.java @@ -40,6 +40,7 @@ import org.onap.so.BaseIntegrationTest; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters; +import org.onap.so.client.aai.AAIVersion; import org.onap.so.db.catalog.beans.ControllerSelectionReference; import org.springframework.beans.factory.annotation.Autowired; @@ -68,21 +69,22 @@ public class AppcRunTasksIT extends BaseIntegrationTest { final String aaiVnfJson = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "aaiGenericVnfWithVservers.json"))); wireMockServer.stubFor( - get(urlEqualTo("/aai/v15/network/generic-vnfs/generic-vnf/testVnfId1?depth=all")).willReturn(aResponse() - .withHeader("Content-Type", "application/json").withBody(aaiVnfJson).withStatus(200))); + get(urlEqualTo("/aai/" + AAIVersion.LATEST + "/network/generic-vnfs/generic-vnf/testVnfId1?depth=all")) + .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(aaiVnfJson) + .withStatus(200))); final String aaiVserverJson = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "aaiVserverFullQueryResponse.json"))); - wireMockServer.stubFor(get(urlEqualTo( - "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/mtn23a/tenants/tenant/e6beab145f6b49098277ac163ac1b4f3/vservers/vserver/48bd7f11-408f-417c-b834-b41c1b98f7d7")) + wireMockServer.stubFor(get(urlEqualTo("/aai/" + AAIVersion.LATEST + + "/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/mtn23a/tenants/tenant/e6beab145f6b49098277ac163ac1b4f3/vservers/vserver/48bd7f11-408f-417c-b834-b41c1b98f7d7")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(aaiVserverJson) .withStatus(200))); - wireMockServer.stubFor(get(urlEqualTo( - "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/mtn23a/tenants/tenant/e6beab145f6b49098277ac163ac1b4f3/vservers/vserver/1b3f44e5-d96d-4aac-bd9a-310e8cfb0af5")) + wireMockServer.stubFor(get(urlEqualTo("/aai/" + AAIVersion.LATEST + + "/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/mtn23a/tenants/tenant/e6beab145f6b49098277ac163ac1b4f3/vservers/vserver/1b3f44e5-d96d-4aac-bd9a-310e8cfb0af5")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(aaiVserverJson) .withStatus(200))); - wireMockServer.stubFor(get(urlEqualTo( - "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/mtn23a/tenants/tenant/e6beab145f6b49098277ac163ac1b4f3/vservers/vserver/14551849-1e70-45cd-bc5d-a256d49548a2")) + wireMockServer.stubFor(get(urlEqualTo("/aai/" + AAIVersion.LATEST + + "/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/mtn23a/tenants/tenant/e6beab145f6b49098277ac163ac1b4f3/vservers/vserver/14551849-1e70-45cd-bc5d-a256d49548a2")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(aaiVserverJson) .withStatus(200))); |