Set controllerType to uppercase for LCM 47/49847/2
authorElena Kuleshov <ek1439@att.com>
Thu, 31 May 2018 20:12:56 +0000 (16:12 -0400)
committerElena Kuleshov <ek1439@att.com>
Wed, 13 Jun 2018 19:05:50 +0000 (15:05 -0400)
Change-Id: If229caa7abfad85f10e5ee7b8f5f6eccfb6600ac
Issue-ID: SO-602
Signed-off-by: Elena Kuleshov <ek1439@att.com>
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