Merge "Set controllerType to uppercase for LCM"
authorSeshu Kumar M <seshu.kumar.m@huawei.com>
Tue, 17 Jul 2018 11:44:41 +0000 (11:44 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 17 Jul 2018 11:44:41 +0000 (11:44 +0000)
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerClientTest.java

index 5182a75..c9e2e88 100644 (file)
@@ -51,7 +51,7 @@ import com.att.eelf.configuration.EELFManager;
 
 public class ApplicationControllerClient {
        
-       public static final String DEFAULT_CONTROLLER_TYPE = "appc";
+       public static final String DEFAULT_CONTROLLER_TYPE = "SDNC";
 
        private static final String CLIENT_NAME = "MSO";
 
@@ -89,7 +89,7 @@ public class ApplicationControllerClient {
                if (controllerType == null) {
                        controllerType = DEFAULT_CONTROLLER_TYPE;
                }
-               this.controllerType = controllerType;
+               this.controllerType = controllerType.toUpperCase();
                appCSupport = new ApplicationControllerSupport();
        }
        
@@ -115,6 +115,7 @@ public class ApplicationControllerClient {
                        if (controllerType == null) {
                                controllerType = DEFAULT_CONTROLLER_TYPE;
                        }
+                       controllerType = controllerType.toUpperCase();
                        return AppcClientServiceFactoryProvider.getFactory(AppcLifeCycleManagerServiceFactory.class)
                                        .createLifeCycleManagerStateful(new ApplicationContext(), getLCMProperties(controllerType));
                } catch (AppcClientException e) {
index 6c2b23b..59be823 100644 (file)
@@ -44,13 +44,13 @@ public class ApplicationControllerClientTest {
        @Test\r
        public void testClientCreation() {\r
                ApplicationControllerClient client = new ApplicationControllerClient("appc");\r
-               assertEquals(client.getControllerType(), "appc");\r
+               assertEquals(client.getControllerType(), "APPC");\r
                assertNotNull(client.getAppCClient());\r
        }\r
 \r
        @Test\r
        public void createRequest_CheckLock_RequestBuilt() {\r
-               ApplicationControllerClient client = new ApplicationControllerClient("appc");\r
+               ApplicationControllerClient client = new ApplicationControllerClient("APPC");\r
                ActionIdentifiers actionIdentifiers = new ActionIdentifiers();\r
                actionIdentifiers.setVnfId("vnfId");\r
                CheckLockInput checkLockInput = (CheckLockInput) client.createRequest(Action.CheckLock, actionIdentifiers, null,\r
@@ -95,7 +95,7 @@ public class ApplicationControllerClientTest {
 \r
        @Test\r
        public void test_getLCMPropertiesHelper() {\r
-               ApplicationControllerClient client = new ApplicationControllerClient("appc");\r
+               ApplicationControllerClient client = new ApplicationControllerClient();\r
                Properties properties = client.getLCMProperties();\r
                assertEquals(properties.get("topic.read"), "APPC-TEST-AMDOCS2");\r
                assertEquals(properties.get("topic.write"), "APPC-TEST-AMDOCS1-DEV3");\r