From 6ba0a22bc952232d14d2d24c5f73a42aae2791a9 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Thu, 11 Oct 2018 13:55:37 -0400 Subject: Dynamic Cloud Owner Support added in cloud configuration object to request params Fix Bean scanning so it picks up the resttemplate removed unnecessary RestTemplate Bean configurations corrected typo in CloudConfiguration class updated gr api test cases with dynamic cloud owner updated groovy files to allow for dynamic cloud owner values updated GR API layer to include cloud owner added enum for default cloud owner add cloud owner variable to camunda in mapping removed references to att-aic from BBInputSetup updated aai schema dependency to 1.3.1 from 1.3.0 Fixed incorrect type AAIUri and updated logging in the method. use existing service instance id instead of generating Pass cloudOwner to process to propagate to subprocesses. NOTE: our aai-schema dependency is 1.3.1-SNAPSHOT to be compatible with the cloud owner changes here. The releaesed 1.3.0 version is NOT compatible. Change-Id: I43b46774b77981d1c8bfe7c7a79b9434889e62ae Issue-ID: SO-1128 Signed-off-by: Benjamin, Max (mb388a) Signed-off-by: Rob Daugherty --- .../serviceinstancebeans/ServiceInstanceBeansTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'common/src/test/java/org/onap') diff --git a/common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java b/common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java index 7a4af7808e..5af84fdb86 100644 --- a/common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java +++ b/common/src/test/java/org/onap/so/serviceinstancebeans/ServiceInstanceBeansTest.java @@ -20,10 +20,16 @@ package org.onap.so.serviceinstancebeans; +import static org.junit.Assert.assertEquals; + +import java.io.IOException; + import org.junit.Test; import org.onap.so.openpojo.rules.HasToStringRule; import org.onap.so.openpojo.rules.ToStringTester; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; import com.openpojo.reflection.PojoClass; import com.openpojo.reflection.PojoClassFilter; import com.openpojo.reflection.filters.FilterEnum; @@ -43,6 +49,17 @@ public class ServiceInstanceBeansTest { public void pojoStructure() { test("org.onap.so.serviceinstancebeans"); } + + @Test + public void cloudConfigurationkeepDefaultValues() throws IOException { + CloudConfiguration cloudConfiguration = new CloudConfiguration(); + cloudConfiguration.setLcpCloudRegionId("myRegionId"); + ObjectMapper mapper = new ObjectMapper(); + + assertEquals("{\"cloudOwner\":\"att-aic\",\"lcpCloudRegionId\":\"myRegionId\"}", mapper.writeValueAsString(cloudConfiguration)); + + + } private void test(String pojoPackage) { Validator validator = ValidatorBuilder.create() -- cgit 1.2.3-korg