summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/constant/ParamConstants.java4
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/vnf/VnfMgrVnfm.java5
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/VnfMgr.java17
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfRoa.java1
4 files changed, 13 insertions, 14 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/constant/ParamConstants.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/constant/ParamConstants.java
index f2f58c6c..549cc1d8 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/constant/ParamConstants.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/constant/ParamConstants.java
@@ -99,7 +99,9 @@ public class ParamConstants {
public static final String VNF_INSTANCE_DEL = "/v2/vapps/instances/%s";
- public static final String VNF_INSTANCE_GET = "/v2/vapps/instances/%s";
+ public static final String VNF_INSTANCE_GET_U2000 = "/v2/vapps/instances/%s";
+
+ public static final String VNF_INSTANCE_GET = "/v2/vnfm/instances/%s";
public static final String VNF_SCALE = "/v2/vapps/instances/%s/scale";
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 9c3a624b..d249d73f 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
@@ -186,8 +186,7 @@ public class VnfMgrVnfm implements InterfaceVnfMgr {
restJson.put(Constant.RETCODE, Constant.REST_FAIL);
JSONObject queryResult = ResultRequestUtil.call(vnfmObject,
- String.format(ParamConstants.VNF_INSTANCE_GET, vnfId) + Constant.ROARAND + "&type=status", Constant.GET,
- null, Constant.CERTIFICATE);
+ String.format(ParamConstants.VNF_INSTANCE_GET, vnfId), Constant.GET, null, Constant.CERTIFICATE);
int statusCode = queryResult.getInt(Constant.RETCODE);
@@ -197,7 +196,7 @@ public class VnfMgrVnfm implements InterfaceVnfMgr {
return restJson;
}
restJson.put(Constant.RETCODE, Constant.REST_SUCCESS);
- restJson.put("data", JSONObject.fromObject(queryResult.getString("data")).getJSONArray("basic"));
+ restJson.put("data", JSONObject.fromObject(queryResult.getString("data")).getJSONArray("vnf_list"));
} else {
LOG.error("function=getVnf, msg=send get vnf msg to csm get wrong status: {}", statusCode);
}
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 be8268a4..e4eb5efc 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
@@ -198,16 +198,15 @@ public class VnfMgr {
JSONObject retJson = restJson.getJSONArray("data").getJSONObject(0);
- basicInfoJson.put("vnfInstanceId", retJson.getString("id"));
- basicInfoJson.put("vnfInstanceName", retJson.getString("vapp_name"));
- basicInfoJson.put("vnfInstanceDescription", "vFW");
-
- Vnfm vnfm = vnfmDao.getVnfmById(retJson.getString("id"));
- basicInfoJson.put(Constant.VNFDID, vnfm == null ? "" : vnfm.getVnfdId());
- basicInfoJson.put("vnfdPackageId", vnfm == null ? "" : vnfm.getVnfPackageId());
- basicInfoJson.put("version", vnfm == null ? "" : vnfm.getVersion());
+ basicInfoJson.put("vnfInstanceId", retJson.getString("vnf_id"));
+ basicInfoJson.put("vnfInstanceName", retJson.getString("vnf_name"));
+ basicInfoJson.put("vnfInstanceDescription", "");
+
+ basicInfoJson.put(Constant.VNFDID, retJson.getString("vnfd_id"));
+ basicInfoJson.put("vnfdPackageId", retJson.getString("vnfd_id"));
+ basicInfoJson.put("version", "1.0");
basicInfoJson.put("vnfProvider", "hw");
- basicInfoJson.put("vnfType", retJson.get("vapp_type"));
+ basicInfoJson.put("vnfType", retJson.get("vnf_type"));
basicInfoJson.put("vnfStatus", retJson.getString(Constant.STATUS));
vnfInfoJson.put("vnfInfo", basicInfoJson);
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 0fc36587..9f297451 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
@@ -203,7 +203,6 @@ public class VnfRoa {
* @param vnfmId
* @param resp
* @param vnfInstanceId
- * @param context
* @return
* @since VFC 1.0
*/