summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/vnf/VnfMgrVnfm.java7
1 files changed, 5 insertions, 2 deletions
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 242ccbdf..185d31cb 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
@@ -97,9 +97,12 @@ public class VnfMgrVnfm implements InterfaceVnfMgr {
restJson.put(Constant.RETCODE, Constant.REST_SUCCESS);
// restJson.put("data",
// queryResult.getJSONObject("data").getJSONObject("scale_info"));
- // JSONObject appInfo =
- // queryResult.getJSONObject("data").getJSONObject("scale_info");
JSONObject appInfo = new JSONObject();
+ try {
+ appInfo = JSONObject.fromObject(queryResult.getString("data")).getJSONObject("scale_info");
+ } catch(JSONException e) {
+ LOG.error("function=scaleVnf, msg=csm return obj is not a json, e={}.", e);
+ }
JSONObject resultObj = new JSONObject();
// resultObj.put(Constant.JOBID, vnfInstanceId + "_" + Constant.PUT);
handleResponse(resultObj, appInfo, vnfInstanceId, Constant.PUT);