/** * Removes the VirtualNetworkFunctionRecord with idVnf into NSR with idNsr * * @param idNsr id of the NSR * @param idVnf id of the VNF * @throws NotFoundException */ @ApiOperation( value = "Remove a single Virtual Network Function Record of a NSR", notes = "The id of NSR and the id of the VNFR are specified in the URL") @RequestMapping(value = "{idNsr}/vnfrecords/{idVnf}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void deleteVNFRecord( @PathVariable("idNsr") String idNsr, @PathVariable("idVnf") String idVnf, @RequestHeader(value = "project-id") String projectId) throws NotFoundException { networkServiceRecordManagement.deleteVNFRecord(idNsr, idVnf, projectId); }
/** * Removes multiple Virtual Network Function Records from the NSR repository * * @param ids: the id list of Virtual Network Function Records * @throws NotFoundException * @throws InterruptedException * @throws ExecutionException * @throws WrongStatusException * @throws VimException */ @ApiOperation( value = "Removing multiple Virtual Network Function Records", notes = "The list of ids in the Request Body specify the Virtual Network Function Records that will be deleted") @RequestMapping( value = "{idNsr}/vnfrecords/multipledelete", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.NO_CONTENT) public void vnfrMultipleDelete( @RequestBody @Valid List<String> ids, @PathVariable("idNsr") String idNsr, @RequestHeader(value = "project-id") String projectId) throws NotFoundException { log.trace("NSR ID: " + idNsr + " Project ID: " + projectId + " VNFR IDs: " + ids); for (String idVnfr : ids) { networkServiceRecordManagement.deleteVNFRecord(idNsr, idVnfr, projectId); } }