summaryrefslogtreecommitdiffstats
path: root/huawei/vnfmadapter/VnfmadapterService/service
diff options
context:
space:
mode:
authorluxin <luxin7@huawei.com>2017-09-15 11:37:04 +0800
committerluxin <luxin7@huawei.com>2017-09-15 11:37:04 +0800
commit6ca80491b00d3f56388cf00a4d4df40beb316d9c (patch)
tree8fc48d2709cf4c4bb5824723a8d5c0c73c3959cf /huawei/vnfmadapter/VnfmadapterService/service
parenta13f8d6eb2c9c7fe996abc0cfc0aa12403933d18 (diff)
Fix healVNF problem in svnfm
Add jobId in response body Change-Id: Ia62d986fa388fdf7166148f7585f4d5568eaa3e9 Issue-Id:VFC-327 Signed-off-by: luxin <luxin7@huawei.com>
Diffstat (limited to 'huawei/vnfmadapter/VnfmadapterService/service')
-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();
}