summaryrefslogtreecommitdiffstats
path: root/huawei
diff options
context:
space:
mode:
authorluxin <luxin7@huawei.com>2017-12-13 14:47:08 +0800
committerluxin <luxin7@huawei.com>2017-12-13 14:47:08 +0800
commitd02c3c0e35400c3accba66da8b76ca3686f7552c (patch)
treeed4260e9ee8a21a2d83cacd1487f119bdc274c33 /huawei
parente6bf504d43a082dc8b2282cabfc84a8e804beaa3 (diff)
Change nslcm notify parameter
Change-Id: I5158e1c2b35deee74f386e46dbbb8f42d5c1c7d6 Issue-ID: VFC-617 Signed-off-by: luxin <luxin7@huawei.com>
Diffstat (limited to 'huawei')
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfResourceRoa.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfResourceRoa.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfResourceRoa.java
index 762f3912..bacfb81c 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfResourceRoa.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfResourceRoa.java
@@ -128,26 +128,27 @@ public class VnfResourceRoa {
changeType = "removed";
operation = "Terminal";
}
- String vnfcInstanceId = dataObject.getString("vnf_id");
+ String vnfInstanceId = dataObject.getString("vnf_id");
for(int i = 0; i < vmList.size(); i++) {
JSONObject vm = vmList.getJSONObject(i);
LOG.info("function=callLcmNotify, vm: {}", vm);
JSONObject affectedVm = new JSONObject();
- affectedVm.put("vnfcInstanceId", vnfcInstanceId);
+ affectedVm.put("vnfcInstanceId", vm.getString("vm_id"));
affectedVm.put("changeType", changeType);
affectedVm.put("vimid", vimId);
affectedVm.put("vmid", vm.getString("vm_id"));
affectedVm.put("vmname", vm.getString("vm_name"));
+ affectedVm.put("vduid", vm.getString("vm_id"));
LOG.info("function=callLcmNotify, affectedVm: {}", affectedVm);
affectedVnfc.add(affectedVm);
}
JSONObject notification = new JSONObject();
notification.put("status", dataObject.getString("vnf_status"));
- notification.put("vnfInstanceId", vnfcInstanceId);
+ notification.put("vnfInstanceId", vnfInstanceId);
notification.put("operation", operation);
notification.put("affectedVnfc", affectedVnfc);
LOG.info("function=callLcmNotify, notification: {}", notification);
- String url = "/api/nslcm/v1/ns/" + vnfmId + "/vnfs/" + vnfcInstanceId + "/Notify";
+ String url = "/api/nslcm/v1/ns/" + vnfmId + "/vnfs/" + vnfInstanceId + "/Notify";
LOG.info("function=callLcmNotify, url: {}", url);
RestfulResponse rsp =
VnfmRestfulUtil.getRemoteResponse(url, VnfmRestfulUtil.TYPE_POST, notification.toString());