From 679afc5a7883de77c55ed4707cbd964aeb565fb4 Mon Sep 17 00:00:00 2001 From: Eric Multanen Date: Mon, 1 Oct 2018 01:39:34 -0700 Subject: Fix up handling of multicloud return status Add calls to query vfmodule status to return when doing create and delete. Return status based on the query result and not the rest response. Put in the completion polling support on create. Change-Id: Ife50509e54e001b92f4a65ec6be2905aef99f9b5 Issue-ID: SO-1082 Signed-off-by: Eric Multanen --- .../org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java | 5 +++++ .../src/test/resources/__files/MulticloudResponse_Stack.json | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'adapters/mso-openstack-adapters') 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 07fa47df42..26d8779ba0 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 @@ -80,6 +80,11 @@ public class MsoVnfMulticloudAdapterImplTest extends BaseRestTestUtils{ //.withHeader() .withStatus(HttpStatus.SC_NOT_FOUND))); + stubFor(get(urlPathEqualTo("/api/multicloud/v1/cloud_owner/cloud_region_id/infra_workload/workload-id")).willReturn(aResponse() + //.withHeader() + .withBodyFile("MulticloudResponse_Stack.json") + .withStatus(HttpStatus.SC_OK))); + stubFor(get(urlPathEqualTo("/api/multicloud/v1/cloud_owner/cloud_region_id/infra_workload/vfname/outputs")).willReturn(aResponse() .withStatus(HttpStatus.SC_NOT_FOUND))); diff --git a/adapters/mso-openstack-adapters/src/test/resources/__files/MulticloudResponse_Stack.json b/adapters/mso-openstack-adapters/src/test/resources/__files/MulticloudResponse_Stack.json index 068cb83a33..cabf6ac6ba 100644 --- a/adapters/mso-openstack-adapters/src/test/resources/__files/MulticloudResponse_Stack.json +++ b/adapters/mso-openstack-adapters/src/test/resources/__files/MulticloudResponse_Stack.json @@ -1,5 +1,5 @@ { "template_type":"heat", "workload_id": "vfname", - "workload_status":"STATUS" - } \ No newline at end of file + "workload_status":"CREATE_COMPLETE" + } -- cgit 1.2.3-korg