summaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/test
diff options
context:
space:
mode:
authorEric Multanen <eric.w.multanen@intel.com>2019-03-30 02:20:01 -0700
committerEric Multanen <eric.w.multanen@intel.com>2019-04-02 18:44:18 -0700
commita0b95750675d602db85191e0875b4e41734db960 (patch)
tree2812c3fc1c7824660a245b6bfb9f2a976b88635b /adapters/mso-openstack-adapters/src/test
parent4a74d94ea4604504325b320d499e2f3708ef1514 (diff)
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 <eric.w.multanen@intel.com>
Diffstat (limited to 'adapters/mso-openstack-adapters/src/test')
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java16
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/application-test.yaml2
2 files changed, 10 insertions, 8 deletions
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)));
diff --git a/adapters/mso-openstack-adapters/src/test/resources/application-test.yaml b/adapters/mso-openstack-adapters/src/test/resources/application-test.yaml
index 398885cd08..8da26e991e 100644
--- a/adapters/mso-openstack-adapters/src/test/resources/application-test.yaml
+++ b/adapters/mso-openstack-adapters/src/test/resources/application-test.yaml
@@ -64,6 +64,8 @@ tomcat:
max-threads: 50
mso:
logPath: logs
+ msb-ip: localhost
+ msb-port: ${wiremock.server.port}
catalog:
db:
spring: