summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluxin <luxin7@huawei.com>2017-09-27 17:04:50 +0800
committerluxin <luxin7@huawei.com>2017-09-27 17:04:50 +0800
commit046d1548036451e1f5dc41e35efab60298c74979 (patch)
treed20c16fbb1760e60cd22afb295e8b950af28642b
parent8e48f152f64b1fcb1f1c3e6e17add9079bf43da2 (diff)
Fix some sonar issue in rest interface
Change-Id: Id7e32cc405db6e0be433aa2f649616a4e1741d76 Issue-Id:VFC-425 Signed-off-by: luxin <luxin7@huawei.com>
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfResourceRoa.java7
1 files changed, 4 insertions, 3 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 be7134ea..6dc49af6 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
@@ -71,7 +71,7 @@ public class VnfResourceRoa {
JSONObject dataObject = VnfmJsonUtil.getJsonFromContexts(context);
LOG.info("function=grantVnfRes, dataObject: {}", dataObject);
- /*if(null == dataObject) {
+ if(null == dataObject) {
LOG.error("function=grantVnfRes, msg=param error");
restJson.put("data", "Params error");
return restJson.toString();
@@ -87,9 +87,10 @@ public class VnfResourceRoa {
String vnfmId = grantObj.getString("project_id");
- JSONObject resultObj = vnfResourceMgr.grantVnfResource(grantObj, vnfId, vnfmId);*/
+ JSONObject resultObj = vnfResourceMgr.grantVnfResource(grantObj, vnfId, vnfmId);
+ LOG.info("grantVnfResource resultObj:", resultObj);
JSONObject res = new JSONObject();
- res.put("msg","grant success");
+ res.put("msg", "grant success");
return res.toString();
}