From a0b95750675d602db85191e0875b4e41734db960 Mon Sep 17 00:00:00 2001 From: Eric Multanen Date: Sat, 30 Mar 2019 02:20:01 -0700 Subject: Construct multicloud infra_workload endpoint Use the cloudOwner and cloudRegion to construct the multicloud endpoint for the multicloud VNF plugin adapter. Use configuration to obtain the MSB IP and port number. Stop using the cloud sites catalog DB since there is only a single endpoint required talking to multicloud. Change-Id: I0e9b45a51b6e36f4782226f851e7d01de7f1b133 Issue-ID: SO-1447 Signed-off-by: Eric Multanen --- .../so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'adapters/mso-openstack-adapters/src/test/java/org/onap') diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java index 152c23e9b8..f3ad4e6d7d 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java @@ -53,7 +53,7 @@ public class MsoVnfMulticloudAdapterImplTest extends BaseRestTestUtils{ @Before public void before() throws Exception { super.orchestrator = "multicloud"; - super.cloudEndpoint = "/api/multicloud/v1/cloud_owner/cloud_region_id/infra_workload"; + super.cloudEndpoint = "/api/multicloud/v1/CloudOwner/MTN13/infra_workload"; super.setUp(); } @@ -70,19 +70,19 @@ public class MsoVnfMulticloudAdapterImplTest extends BaseRestTestUtils{ msoRequest.setRequestId("12345"); msoRequest.setServiceInstanceId("12345"); - wireMockServer.stubFor(get(urlPathEqualTo("/api/multicloud/v1/cloud_owner/cloud_region_id/infra_workload/vfname")).willReturn(aResponse() + wireMockServer.stubFor(get(urlPathEqualTo("/api/multicloud/v1/CloudOwner/MTN13/infra_workload/vfname")).willReturn(aResponse() //.withHeader() .withStatus(HttpStatus.SC_NOT_FOUND))); - wireMockServer.stubFor(get(urlPathEqualTo("/api/multicloud/v1/cloud_owner/cloud_region_id/infra_workload/workload-id")).willReturn(aResponse() + wireMockServer.stubFor(get(urlPathEqualTo("/api/multicloud/v1/CloudOwner/MTN13/infra_workload/workload-id")).willReturn(aResponse() //.withHeader() .withBodyFile("MulticloudResponse_Stack.json") .withStatus(HttpStatus.SC_OK))); - wireMockServer.stubFor(get(urlPathEqualTo("/api/multicloud/v1/cloud_owner/cloud_region_id/infra_workload/vfname/outputs")).willReturn(aResponse() + wireMockServer.stubFor(get(urlPathEqualTo("/api/multicloud/v1/CloudOwner/MTN13/infra_workload/vfname/outputs")).willReturn(aResponse() .withStatus(HttpStatus.SC_NOT_FOUND))); - wireMockServer.stubFor(post(urlPathEqualTo("/api/multicloud/v1/cloud_owner/cloud_region_id/infra_workload")).willReturn(aResponse() + wireMockServer.stubFor(post(urlPathEqualTo("/api/multicloud/v1/CloudOwner/MTN13/infra_workload")).willReturn(aResponse() .withBodyFile("MulticloudResponse_Stack_Create.json") .withStatus(HttpStatus.SC_CREATED))); @@ -95,11 +95,11 @@ public class MsoVnfMulticloudAdapterImplTest extends BaseRestTestUtils{ msoRequest.setRequestId("12345"); msoRequest.setServiceInstanceId("12345"); - wireMockServer.stubFor(get(urlPathEqualTo("/api/multicloud/v1/cloud_owner/cloud_region_id/infra_workload/workload-id")).willReturn(aResponse() + wireMockServer.stubFor(get(urlPathEqualTo("/api/multicloud/v1/CloudOwner/MTN13/infra_workload/workload-id")).willReturn(aResponse() .withBodyFile("MulticloudResponse_Stack.json") .withStatus(HttpStatus.SC_OK))); - wireMockServer.stubFor(delete(urlPathEqualTo("/api/multicloud/v1/cloud_owner/cloud_region_id/infra_workload/workload-id")).willReturn(aResponse() + wireMockServer.stubFor(delete(urlPathEqualTo("/api/multicloud/v1/CloudOwner/MTN13/infra_workload/workload-id")).willReturn(aResponse() .withStatus(HttpStatus.SC_NO_CONTENT))); instance.deleteVfModule("MTN13", "CloudOwner", "123", "workload-id", msoRequest, new Holder<>()); @@ -111,7 +111,7 @@ public class MsoVnfMulticloudAdapterImplTest extends BaseRestTestUtils{ msoRequest.setRequestId("12345"); msoRequest.setServiceInstanceId("12345"); - wireMockServer.stubFor(get(urlPathEqualTo("/api/multicloud/v1/cloud_owner/cloud_region_id/infra_workload/workload-id")).willReturn(aResponse() + wireMockServer.stubFor(get(urlPathEqualTo("/api/multicloud/v1/CloudOwner/MTN13/infra_workload/workload-id")).willReturn(aResponse() .withBodyFile("MulticloudResponse_Stack.json") .withStatus(HttpStatus.SC_OK))); -- cgit 1.2.3-korg