summaryrefslogtreecommitdiffstats
path: root/juju
diff options
context:
space:
mode:
Diffstat (limited to 'juju')
-rw-r--r--juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/EntityUtils.java3
-rw-r--r--juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/LocalComandUtils.java3
-rw-r--r--juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/SwitchController.java8
-rw-r--r--juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/restclient/ExceptionArgs.java3
-rw-r--r--juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/service/process/VnfMgr.java6
-rw-r--r--juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/service/rest/VnfRoa.java2
6 files changed, 17 insertions, 8 deletions
diff --git a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/EntityUtils.java b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/EntityUtils.java
index 1cb803c..4056dd7 100644
--- a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/EntityUtils.java
+++ b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/EntityUtils.java
@@ -288,7 +288,8 @@ public class EntityUtils {
public void run() {
try {
exitValue = process.waitFor();
- } catch(InterruptedException e) {
+ } catch(Exception e) {
+ LOG.error("process.waitFor(): ",e);
return;
}
}
diff --git a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/LocalComandUtils.java b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/LocalComandUtils.java
index 7cf6418..7dc980d 100644
--- a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/LocalComandUtils.java
+++ b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/LocalComandUtils.java
@@ -196,7 +196,8 @@ public class LocalComandUtils {
public void run() {
try {
exitValue = process.waitFor();
- } catch(InterruptedException e) {
+ } catch(Exception e) {
+ log.error("process.waitFor(): ",e);
return;
}
}
diff --git a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/SwitchController.java b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/SwitchController.java
index 325be7a..bf43464 100644
--- a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/SwitchController.java
+++ b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/SwitchController.java
@@ -31,7 +31,7 @@ public class SwitchController {
* turn debug model
*/
private static boolean debugModel = false;
- public static String vnfmServiceUrl = null;
+ private static String vnfmServiceUrl = null;
public SwitchController() { //NOSONAR
//Constructor
@@ -52,4 +52,10 @@ public class SwitchController {
SwitchController.debugModel = debugModel;
}
+ public static void setVnfmServiceUrl(String inVnfmServiceUrl) {
+ SwitchController.vnfmServiceUrl = inVnfmServiceUrl;
+ }
+ public static String getVnfmServiceUrl() {
+ return SwitchController.vnfmServiceUrl;
+ }
}
diff --git a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/restclient/ExceptionArgs.java b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/restclient/ExceptionArgs.java
index 403f89b..a0500de 100644
--- a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/restclient/ExceptionArgs.java
+++ b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/restclient/ExceptionArgs.java
@@ -15,6 +15,7 @@
*/
package org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.common.restclient;
+import java.io.Serializable;
/**
* ROA exception handling parameters.
@@ -25,7 +26,7 @@ package org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.common.restclient;
* @author
* @version 28-May-2016
*/
-public class ExceptionArgs {
+public class ExceptionArgs implements Serializable{
/**
* Exception descriptions.
diff --git a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/service/process/VnfMgr.java b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/service/process/VnfMgr.java
index 0fceb1e..9c2e981 100644
--- a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/service/process/VnfMgr.java
+++ b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/service/process/VnfMgr.java
@@ -103,7 +103,7 @@ public class VnfMgr {
LOG.warn("the value 'vnfmServiceUrl' not exist."+e.getMessage());
}
if (StringUtils.isBlank(url)) {
- url = SwitchController.vnfmServiceUrl;
+ url = SwitchController.getVnfmServiceUrl();
}
if (StringUtils.isBlank(url)) {
JSONObject vnfmObject = VnfmUtil.getVnfmById(vnfmId);
@@ -242,7 +242,7 @@ public class VnfMgr {
JSONObject restJson = new JSONObject();
restJson.put(EntityUtils.RESULT_CODE_KEY, Constant.REST_FAIL);
try {
- String url = SwitchController.vnfmServiceUrl;
+ String url = SwitchController.getVnfmServiceUrl();
if (StringUtils.isBlank(url)) {
JSONObject vnfmObject = VnfmUtil.getVnfmById(vnfmId);
@@ -305,7 +305,7 @@ public class VnfMgr {
JSONObject restJson = new JSONObject();
restJson.put(EntityUtils.RESULT_CODE_KEY, Constant.REST_FAIL);
try {
- String url = SwitchController.vnfmServiceUrl;
+ String url = SwitchController.getVnfmServiceUrl();
JSONObject vnfmObject = null;
if (StringUtils.isBlank(url)) {
// call the ESR to get jujuvnfm server url
diff --git a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/service/rest/VnfRoa.java b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/service/rest/VnfRoa.java
index 1f2a97c..98e8a4a 100644
--- a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/service/rest/VnfRoa.java
+++ b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/service/rest/VnfRoa.java
@@ -95,7 +95,7 @@ public class VnfRoa {
result.put("retCode", Constant.REST_SUCCESS);
JSONObject reqJsonObject = StringUtil.getJsonFromContexts(context);
String vnfmServiceUrl = reqJsonObject.getString("url");
- SwitchController.vnfmServiceUrl = vnfmServiceUrl;
+ SwitchController.setVnfmServiceUrl(vnfmServiceUrl);
LOG.info(reqJsonObject + ":setVNFMInfo success!");
return result.toString();
}