+
+ public JSONObject getJobFromVnfm(JSONObject vnfmObjcet, String jobId) {
+ LOG.warn("function=getJobFromVnfm, jobId: {}", jobId);
+ JSONObject restJson = new JSONObject();
+ restJson.put(Constant.RETCODE, Constant.REST_FAIL);
+
+ JSONObject queryResult = ResultRequestUtil.call(vnfmObjcet, String.format(UrlConstant.URL_JOBSTATUS_GET, jobId),
+ Constant.GET, null, Constant.CERTIFICATE);
+
+ int statusCode = queryResult.getInt(Constant.RETCODE);
+ if(statusCode == Constant.HTTP_OK || statusCode == Constant.HTTP_CREATED) {
+ if((queryResult.get("data")) == null) {
+ LOG.warn("function=getJobFromVnfm, msg=query is null {}", queryResult.get("data"));
+ return restJson;
+ }
+ restJson.put(Constant.RETCODE, Constant.REST_SUCCESS);
+ restJson.put("data", JSONObject.fromObject(queryResult.getString("data")));
+ } else {
+ LOG.error("function=getJobFromVnfm, msg=query job from vnfm wrong status: {}", statusCode);
+ }
+
+ return restJson;
+ }