diff options
Diffstat (limited to 'huawei')
3 files changed, 5 insertions, 11 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/VnfmUtil.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/VnfmUtil.java index 9b8ef6ee..3ac3dbee 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/VnfmUtil.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/VnfmUtil.java @@ -62,7 +62,7 @@ public final class VnfmUtil { Base64 token = new Base64(); String authen = new String(token.encode(("AAI:AAI").getBytes())); headerMap.put("Authorization", "Basic " + authen); - LOGGER.info("getVimById headerMap: {}", headerMap.toString()); + LOGGER.info("getVnfmById headerMap: {}", headerMap.toString()); RestfulResponse rsp = VnfmRestfulUtil.getRemoteResponse(String.format(ParamConstants.ESR_GET_VNFM_URL, vnfmId), VnfmRestfulUtil.TYPE_GET, headerMap, null); @@ -77,7 +77,7 @@ public final class VnfmUtil { JSONObject esrVnfm = JSONObject.fromObject(rsp.getResponseContent()); LOGGER.info("esrVnfm: {}", esrVnfm); JSONObject vnfmJson = parseEsrVnfm(vnfmId, esrVnfm); - LOGGER.info("vnfmJson: {}", esrVnfm); + LOGGER.info("vnfmJson: {}", vnfmJson); return vnfmJson; } diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java index e3bc1b29..67e2497d 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java @@ -104,7 +104,7 @@ public class AdapterResourceManager implements IResourceManager { String downloadUri = ""; if(Integer.valueOf(csarobj.get(Constant.RETCODE).toString()) == Constant.HTTP_OK) { LOG.info("get CSAR info successful.", csarobj.get(Constant.RETCODE)); - downloadUri = csarobj.getString("downloadUri"); + downloadUri = csarobj.getJSONObject("packageInfo").getString("downloadUrl"); } else { LOG.error("get CSAR info fail.", csarobj.get(Constant.RETCODE)); resultObj.put(Constant.REASON, csarobj.get(Constant.REASON).toString()); @@ -148,13 +148,7 @@ public class AdapterResourceManager implements IResourceManager { // get VNFM connection info // getVnfmConnInfo(vnfmMap) JSONObject vnfmObject = VnfmUtil.getVnfmById(vnfmid); - if(Integer.valueOf(vnfmObject.get(Constant.RETCODE).toString()) != Constant.HTTP_OK) { - LOG.error("get Vnfm Connection Info fail.", vnfmObject.get(Constant.RETCODE)); - resultObj.put(Constant.REASON, vnfmObject.get(Constant.REASON).toString()); - resultObj.put(Constant.RETCODE, vnfmObject.get(Constant.RETCODE).toString()); - return resultObj; - } - LOG.info("get Vnfm Connection Info successful.", vnfmObject.get(Constant.RETCODE)); + LOG.info("get Vnfm Connection Info successful."); String vnfmUrl = vnfmObject.getString("url"); String userName = vnfmObject.getString(Constant.USERNAME); diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/constant/UrlConstant.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/constant/UrlConstant.java index 23f750a8..72ebb267 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/constant/UrlConstant.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/constant/UrlConstant.java @@ -28,7 +28,7 @@ public class UrlConstant { public static final String REST_DRIVERMGR_REGISTER = "/api/drivermgr/v1/drivers"; - public static final String REST_CSARINFO_GET = "/api/catalog/v1/csars/%s"; + public static final String REST_CSARINFO_GET = "/api/catalog/v1/vnfpackages/%s"; public static final String REST_VNFMINFO_GET = "/api/extsys/v1/vnfms/%s"; |