fix patch 12 81/13281/1
authorHarry Huang <huangxiangyu5@huawei.com>
Tue, 19 Sep 2017 03:24:00 +0000 (11:24 +0800)
committerHarry Huang <huangxiangyu5@huawei.com>
Tue, 19 Sep 2017 03:33:52 +0000 (11:33 +0800)
major: L18 L23
critical: L26 L27

Change-Id: I5b60a58102e3f900a65af0596fdd4ba1cb1dc832
Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
Issue-Id: VNFSDK-85

vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonConstant.java
vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/HttpServerPathConfig.java
vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/MsbAddrConfig.java

index 5432300..efeef06 100644 (file)
@@ -16,6 +16,9 @@
 package org.onap.vnfsdk.marketplace.common;
 
 public class CommonConstant {
+  // Address
+  public static final String DEFAULT_MSB_ADDRESS = "http://127.0.0.1:8080";
+
   // Package Status
   public static final String PACKAGE_STATUS_DELETING = "deleting";
 
@@ -39,9 +42,9 @@ public class CommonConstant {
   public static final String DEFINITIONS = "Definitions";
 
   public static final String CSAR_META = "csar.meta";
-  
+
   public static final String MANIFEST = ".mf";
-  
+
   public static final String MF_VERSION_META = "vnf_package_version";
 
   public static final String MF_PRODUCT_NAME = "vnf_product_name";
@@ -53,46 +56,46 @@ public class CommonConstant {
   public static final String CSAR_SUFFIX = ".csar";
 
   public static final String HTTP_HEADER_CONTENT_RANGE = "Content-Range";
-  
+
   public static final  String CATALOG_CSAR_DIR_NAME = "/csar";
-  
+
   public static final  String REPORT_CSAR_DIR_NAME = "/reports";
-  
+
   public static final String COMETD_CHANNEL_PACKAGE_DELETE = "/package/delete";
-  
+
   public static final String SUCCESS_STR = "SUCCESS";
-  
+
   public static final int ONBOARDING_THREAD_COUNT = 1;
   public static final int SUCESS = 0;
   public static final int FAILED = -1;
-  
+
   public static final  String CATALOUGE_UPLOAD_URL = "/openoapi/catalog/v1/csars";
-  
+
   private CommonConstant (){
-         // Cannot create instance of the class
+      // Cannot create instance of the class
   }
-  
-  public static class functionTest 
-  {    
+
+  public static class functionTest
+  {
       public static final String FUNCTEST_URL = "/openoapi/vnfsdk/v1/functest/";
       public static final String FUNCTEST_RESULT_URL = "/openoapi/vnfsdk/v1/functest/download/";
       public static final String FUNCTEST_OPERTYPE_ID = "functiontest";
       public static final String FUNCTEST_PACKAGE_EXISTS = "packageExists";
       public static final String FUNCTEST_EXEC = "functestexec";
-      
+
       private functionTest() {
       }
   }
-    
-  public static class LifeCycleTest 
-  {    
+
+  public static class LifeCycleTest
+  {
       public static final String LIFECYCLE_TEST_URL = "/openoapi/nslcm/v1/vnfpackage";
       public static final String LIFECYCLE_TEST_OPERTYPE_ID = "lifecycletest";
       public static final String LIFECYCLE_TEST_EXEC = "lifecycleTestexec";
       private LifeCycleTest() {
       }
   }
-    
+
   public static class HttpContext {
 
       public static final String CONTENT_TYPE = "Content-Type";
@@ -106,7 +109,7 @@ public class CommonConstant {
       private HttpContext() {
       }
   }
-  
+
   public static class MethodType {
 
       public static final String POST = "post";
@@ -120,12 +123,12 @@ public class CommonConstant {
       private MethodType() {
       }
   }
-  
+
   public static class MsbRegisterCode {
 
       public static final int MSDB_REGISTER_RETRIES = 12;
       public static final int MSDB_REGISTER_RETRY_SLEEP = 10000;
-      
+
       public static final int MSDB_REGISTER_FILE_NOT_EXISTS = 2;
       public static final int MSDB_REGISTER_SUCESS = 0;
       public static final int MSDB_REGISTER_FAILED = -1;
@@ -133,3 +136,4 @@ public class CommonConstant {
       }
   }
 }
+
index 3d5cfac..f7a499b 100644 (file)
@@ -17,15 +17,15 @@ package org.onap.vnfsdk.marketplace.common;
 
 public class HttpServerPathConfig {
   protected static String httpServerPath;
-  
+
+  private HttpServerPathConfig() {
+  }
+
   static
   {
-//  CatalogAppConfiguration configuration = new CatalogAppConfiguration();
-//  Config.setConfigration(configuration);
-//  Config.getConfigration().setMsbServerAddr("http://127.0.0.1:80");
-  MsbAddrConfig.setMsbAddress("http://127.0.0.1:8080");
-  HttpServerAddrConfig.setHttpServerAddress("http://127.0.0.1:8080");
-  HttpServerPathConfig.setHttpServerPath("../tomcat/webapps/ROOT/");
+    MsbAddrConfig.setMsbAddress(CommonConstant.DEFAULT_MSB_ADDRESS);
+    HttpServerAddrConfig.setHttpServerAddress(CommonConstant.DEFAULT_MSB_ADDRESS);
+    HttpServerPathConfig.setHttpServerPath("../tomcat/webapps/ROOT/");
   }
 
   public static String getHttpServerPath() {
@@ -36,3 +36,4 @@ public class HttpServerPathConfig {
     HttpServerPathConfig.httpServerPath = httpServerPath;
   }
 }
+
index d2ff4b5..379f103 100644 (file)
@@ -19,6 +19,9 @@ public class MsbAddrConfig {
 
   protected static String msbAddress;
 
+  private MsbAddrConfig() {
+  }
+
   public static String getMsbAddress() {
     return msbAddress;
   }
@@ -28,3 +31,4 @@ public class MsbAddrConfig {
   }
 
 }
+