From 046d1548036451e1f5dc41e35efab60298c74979 Mon Sep 17 00:00:00 2001 From: luxin Date: Wed, 27 Sep 2017 17:04:50 +0800 Subject: Fix some sonar issue in rest interface Change-Id: Id7e32cc405db6e0be433aa2f649616a4e1741d76 Issue-Id:VFC-425 Signed-off-by: luxin --- .../nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfResourceRoa.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'huawei/vnfmadapter/VnfmadapterService') 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(); } -- cgit 1.2.3-korg