summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGao Weitao <victor.gao@huawei.com>2017-09-15 03:56:44 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-15 03:56:44 +0000
commitfa7789059a8abb39ae7125f186c4a95f3e236594 (patch)
tree7310d327f0df704cc677344362aa215dc50b7284
parentefafa658f181671c71355a3e9a82003a648baa88 (diff)
parent6ca80491b00d3f56388cf00a4d4df40beb316d9c (diff)
Merge "Fix healVNF problem in svnfm"
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/ResultRequestUtil.java4
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/vnf/VnfMgrVnfm.java4
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoa.java1
3 files changed, 6 insertions, 3 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/ResultRequestUtil.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/ResultRequestUtil.java
index 8890412f..2f38cf2c 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/ResultRequestUtil.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/ResultRequestUtil.java
@@ -247,7 +247,9 @@ public final class ResultRequestUtil {
String vnfPath = path.contains("%s") ? String.format(path, mgrVcmm.getRoaRand()) : path;
String oldUrl = vnfmObject.getString("url").trim();
String newUrl = oldUrl.replaceAll("30001", "30000");
- LOG.info("function=call, msg=url is {}, session is {}", newUrl + vnfPath, mgrVcmm.getAccessSession());
+ LOG.info("function=callSouth, msg=url is {}, session is {}", newUrl + vnfPath, mgrVcmm.getAccessSession());
+ LOG.info("function=callSouth, paramsJson is {}", paramsJson);
+
HttpRequests.Builder builder =
new HttpRequests.Builder(authModel).addHeader("X-Auth-Token", mgrVcmm.getAccessSession())
.setUrl(newUrl, vnfPath).setParams(paramsJson);
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/vnf/VnfMgrVnfm.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/vnf/VnfMgrVnfm.java
index 9fa4260c..e22260fd 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/vnf/VnfMgrVnfm.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/vnf/VnfMgrVnfm.java
@@ -247,11 +247,11 @@ public class VnfMgrVnfm implements InterfaceVnfMgr {
JSONObject subJsonObject = new JSONObject();
subJsonObject.put("type", "hard");
- subJsonObject.put("boot_mode", null);
+ subJsonObject.put("boot_mode", "");
if("vmReset".equals(action)) {
subJsonObject.put("action", "reset");
}
-
+ LOG.info("healVnf subJsonObject :" + subJsonObject);
JSONObject healResult = ResultRequestUtil.callSouth(vnfmObjcet, path, Constant.PUT, subJsonObject.toString(),
Constant.CERTIFICATE);
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoa.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoa.java
index 4afd58a3..b7ad0b03 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoa.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoa.java
@@ -314,6 +314,7 @@ public class VnfRoa {
}
restJson.remove(Constant.RETCODE);
+ restJson.put("jobId", vnfInstanceId + "_put");
return restJson.toString();
}