summaryrefslogtreecommitdiffstats
path: root/huawei/vnfmadapter/VnfmadapterService/service
diff options
context:
space:
mode:
authorliuqian <liuqian13@huawei.com>2018-05-17 10:07:45 +0800
committerliuqian <liuqian13@huawei.com>2018-05-17 10:07:45 +0800
commit65de5e8a56100c0c44b8fce128d4b8c8e67a2a0c (patch)
tree38f4c6243067527afd6104ffbe86a1dfa62638af /huawei/vnfmadapter/VnfmadapterService/service
parent4daf04bfd4147b59490a8425407065eccd017478 (diff)
fix scale jobid
Change-Id: I751df1bf2eb8c5c99c48ba32264f67b200858886 Issue-ID: VFC-868 Signed-off-by: liuqian <liuqian13@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/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);