summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonConstant.java20
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/HttpServerPathConfig.java18
2 files changed, 24 insertions, 14 deletions
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonConstant.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonConstant.java
index efeef061..1ba18cd6 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonConstant.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonConstant.java
@@ -16,8 +16,6 @@
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";
@@ -87,15 +85,6 @@ public class CommonConstant {
}
}
- 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";
@@ -110,6 +99,15 @@ public class CommonConstant {
}
}
+ 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 MethodType {
public static final String POST = "post";
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/HttpServerPathConfig.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/HttpServerPathConfig.java
index f7a499b5..af6f428f 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/HttpServerPathConfig.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/HttpServerPathConfig.java
@@ -14,8 +14,14 @@
* limitations under the License.
*/
package org.onap.vnfsdk.marketplace.common;
+import java.net.InetAddress;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class HttpServerPathConfig {
+ public static final Logger logger = LoggerFactory.getLogger(FileUtil.class);
+
protected static String httpServerPath;
private HttpServerPathConfig() {
@@ -23,9 +29,15 @@ public class HttpServerPathConfig {
static
{
- MsbAddrConfig.setMsbAddress(CommonConstant.DEFAULT_MSB_ADDRESS);
- HttpServerAddrConfig.setHttpServerAddress(CommonConstant.DEFAULT_MSB_ADDRESS);
- HttpServerPathConfig.setHttpServerPath("../tomcat/webapps/ROOT/");
+ try {
+ InetAddress address = InetAddress.getByName("localhost");
+ String msbAddress = "http://" + address.getHostAddress() + ":8080";
+ MsbAddrConfig.setMsbAddress(msbAddress);
+ HttpServerAddrConfig.setHttpServerAddress(msbAddress);
+ HttpServerPathConfig.setHttpServerPath("../tomcat/webapps/ROOT/");
+ } catch (Exception e) {
+ logger.info("error while config htttp server", e);
+ }
}
public static String getHttpServerPath() {