import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.eclipse.jetty.http.HttpStatus;
-import org.onap.aai.esr.entity.rest.VnfmRestData;
+import org.onap.aai.esr.entity.rest.VnfmRegisterInfo;
import org.onap.aai.esr.util.ExtsysUtil;
import org.onap.aai.esr.wrapper.VnfmManagerWrapper;
import org.slf4j.Logger;
private static final Logger LOGGER = LoggerFactory.getLogger(VnfmManager.class);
+ private static ExtsysUtil extsysUtil = new ExtsysUtil();
+
/**
* query all vnfm.
*/
- @Path("")
@GET
@ApiOperation(value = "get all vnfm ")
@Produces(MediaType.APPLICATION_JSON)
@ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error",
response = String.class)})
@Timed
- public Response updateVnfm(@ApiParam(value = "vnfm", required = true) VnfmRestData vnfm,
+ public Response updateVnfm(@ApiParam(value = "vnfm", required = true) VnfmRegisterInfo vnfm,
@ApiParam(value = "vnfm id", required = true) @PathParam("vnfmId") String vnfmId) {
- LOGGER.info("start update vnfm .id:" + vnfmId + " info:" + ExtsysUtil.objectToString(vnfm));
+ LOGGER.info("start update vnfm .id:" + vnfmId + " info:" + extsysUtil.objectToString(vnfm));
return VnfmManagerWrapper.getInstance().updateVnfm(vnfm, vnfmId);
}
* add vnfm .
*/
@POST
- @Path("")
@Consumes(MediaType.APPLICATION_JSON)
@Produces({MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON})
@ApiOperation(value = "create a vnfm")
@ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "internal server error",
response = String.class)})
@Timed
- public Response registerVnfm(@ApiParam(value = "vnfm", required = true) VnfmRestData vnfm) {
+ public Response registerVnfm(@ApiParam(value = "vnfm", required = true) VnfmRegisterInfo vnfm) {
return VnfmManagerWrapper.getInstance().registerVnfm(vnfm);
}
}