From 6ca80491b00d3f56388cf00a4d4df40beb316d9c Mon Sep 17 00:00:00 2001 From: luxin Date: Fri, 15 Sep 2017 11:37:04 +0800 Subject: Fix healVNF problem in svnfm Add jobId in response body Change-Id: Ia62d986fa388fdf7166148f7585f4d5568eaa3e9 Issue-Id:VFC-327 Signed-off-by: luxin --- .../vfc/nfvo/vnfm/svnfm/vnfmadapter/common/ResultRequestUtil.java | 4 +++- .../vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/vnf/VnfMgrVnfm.java | 4 ++-- .../org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoa.java | 1 + 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(); } -- cgit 1.2.3-korg