diff options
Diffstat (limited to 'huawei/vnfmadapter/VnfmadapterService/service/src/main')
2 files changed, 8 insertions, 16 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java index d88cf789..34943770 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java @@ -90,10 +90,7 @@ public class AuthRoa { JSONObject data = authResult.getJSONObject("data"); resp.setStatus(Constant.HTTP_OK); - // resp.setHeader("accessSession", data.getString("accessSession")); - return data.toString();// String.format(ParamConstants.GET_TOKEN_SUC_RESP, - // data.getString(Constant.USERNAME), - // data.getString(Constant.USERNAME), data.getString("roaRand")); + return data.toString(); } else if(authResult.getInt(Constant.RETCODE) == Constant.HTTP_INNERERROR) { Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(authResult.getString("data")).build(); @@ -117,8 +114,8 @@ public class AuthRoa { */ @DELETE @Path("/auth/tokens/{userName}/{roarand}") - public String delAuthToken(@Context HttpServletRequest context, @PathParam(Constant.USERNAME) String userName, - @PathParam("roarand") String roarand, @Context HttpServletResponse resp) { + public String delAuthToken(@PathParam(Constant.USERNAME) String userName, @PathParam("roarand") String roarand, + @Context HttpServletResponse resp) { LOG.warn("function=logout, msg=enter to logout"); JSONObject resultJson = new JSONObject(); @@ -139,8 +136,7 @@ public class AuthRoa { */ @GET @Path("/nfvo/shakehand") - public String shakehand(@Context HttpServletRequest context, @QueryParam("roattr") String roattr, - @Context HttpServletResponse resp) { + public String shakehand(@QueryParam("roattr") String roattr, @Context HttpServletResponse resp) { JSONObject resultJson = new JSONObject(); resultJson.put("status", "running"); resultJson.put("description", "Operation success"); diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java index bcc24878..fe9f9530 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Huawei Technologies Co., Ltd. + * Copyright 2016-2017 Huawei Technologies Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,12 +16,10 @@ package org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest; -import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.adapter.impl.AdapterResourceManager; @@ -30,7 +28,6 @@ import org.slf4j.LoggerFactory; import net.sf.json.JSONObject; - /** * Provide interfaces of resource for VNFM. * <br/> @@ -45,7 +42,6 @@ public class VnfAdapterResourceRoa { private static final Logger LOG = LoggerFactory.getLogger(VnfAdapterResourceRoa.class); - /** * Provide function of grant resource. * <br/> @@ -55,13 +51,13 @@ public class VnfAdapterResourceRoa { * @since VFC 1.0 */ @GET - public String getAllCloudInfo(@Context HttpServletRequest context) { + public String getAllCloudInfo() { LOG.info("function=getAllCloudInfo, msg=getAllCloudInfo resource"); - //Find a way to get url and pass it getAllCloud(); //NOSONAR + // Find a way to get url and pass it getAllCloud() AdapterResourceManager arm = new AdapterResourceManager(); - JSONObject resultObj = arm.getAllCloud("",""); + JSONObject resultObj = arm.getAllCloud("", ""); return resultObj.getString("vim_id"); } |