diff options
Diffstat (limited to 'huawei')
3 files changed, 14 insertions, 4 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/VnfMgr.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/VnfMgr.java index 7b5c1baf..cf0e3b39 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/VnfMgr.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/VnfMgr.java @@ -359,18 +359,22 @@ public class VnfMgr { JSONObject jobInfoJson = new JSONObject(); JSONObject jobInfo = restJson.getJSONObject("data").getJSONObject("job_info"); jobInfoJson.put("jobId", jobInfo.getString("job_id") + ":job"); - responseJson.put("progress", jobInfo.getString("task_progress_rate")); + String taskProgress = jobInfo.getString("task_progress_rate"); + responseJson.put("progress", taskProgress); + int responseId = Integer.parseInt(taskProgress); String taskStatus = jobInfo.getString("task_status"); if(taskStatus.equalsIgnoreCase("Successfully") || taskStatus.equalsIgnoreCase("finished")) { responseJson.put("status", "finished"); + responseId++; } else if(taskStatus.equalsIgnoreCase("Failed")) { responseJson.put("status", "error"); + responseId++; } else { responseJson.put("status", "processing"); } responseJson.put("errorCode", jobInfo.getString("error_code")); - responseJson.put("responseId", jobInfo.getString("task_progress_rate")); + responseJson.put("responseId", String.valueOf(responseId)); jobInfoJson.put("responsedescriptor", responseJson); LOG.warn("function=getJobBody, jobInfoJson: {}", jobInfoJson); return jobInfoJson.toString(); 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 c16f0730..dbd87301 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 @@ -124,9 +124,15 @@ public class VnfResourceRoa { if(1 == dataObject.getInt("event_type")) { changeType = "added"; operation = "Instantiate"; - } else { + } else if(4 == dataObject.getInt("event_type")) { changeType = "removed"; operation = "Terminal"; + } else if(3 == dataObject.getInt("event_type")) { + changeType = "added"; + operation = "Scaleout"; + } else if(2 == dataObject.getInt("event_type")) { + changeType = "removed"; + operation = "Scalein"; } String vnfInstanceId = dataObject.getString("vnf_id"); for(int i = 0; i < vmList.size(); i++) { 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 15786b66..fc374b66 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 @@ -302,7 +302,7 @@ public class VnfRoa { * "affectedvm": { * "vmid": "804cca71 - 9ae9 - 4511 - 8e30 - d1387718caff", * "vduid": "vdu_100", - * "vmname": "ZTE_SSS_111_PP_2_L" + * "vmname": "SBC_111_PP_2_L" * } * } * @param resp |