import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.WebApplicationException;
-import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
@RestController
@RequestMapping(ChangeManagementController.CHANGE_MANAGEMENT)
public class ChangeManagementController extends UnRestrictedBaseController {
- private static final String GetWorkflowsResponse = null;
public static final String VNF_WORKFLOW_RELATION = "vnf_workflow_relation";
public static final String CHANGE_MANAGEMENT = "change-management";
public static final String GET_VNF_WORKFLOW_RELATION = "get_vnf_workflow_relation";
}
@RequestMapping(value = {"/workflow"}, method = RequestMethod.GET)
- public ResponseEntity<Collection<String>> getWorkflow(@RequestParam("vnfs") Collection<String> vnfs) throws IOException, InterruptedException {
+ public ResponseEntity<Collection<String>> getWorkflow(@RequestParam("vnfs") Collection<String> vnfs) {
Collection<String> result = this.workflowService.getWorkflowsForVNFs(vnfs);
return new ResponseEntity<>(result, OK);
}
@RequestMapping(value = {"/mso"}, method = RequestMethod.GET)
- public ResponseEntity<Collection<Request>> getMSOChangeManagements() throws Exception, IOException, InterruptedException {
+ public ResponseEntity<Collection<Request>> getMSOChangeManagements() {
Collection<Request> result = this.changeManagementService.getMSOChangeManagements();
return new ResponseEntity<>(result, OK);
@RequestMapping(value = {"/scheduler"}, method = RequestMethod.GET)
- public ResponseEntity<JSONArray> getSchedulerChangeManagements() throws IOException, InterruptedException {
+ public ResponseEntity<JSONArray> getSchedulerChangeManagements() {
JSONArray result = this.changeManagementService.getSchedulerChangeManagements();
return new ResponseEntity<>(result, OK);
}
@RequestMapping(value = {SCHEDULER_BY_SCHEDULE_ID}, method = RequestMethod.DELETE)
- public ResponseEntity deleteSchedule(@PathVariable("scheduleId") String scheduleId) throws IOException, InterruptedException {
+ public ResponseEntity deleteSchedule(@PathVariable("scheduleId") String scheduleId) {
Pair<String, Integer> result = this.changeManagementService.deleteSchedule(scheduleId);
return ResponseEntity.status(result.getRight()).build();
}
@RequestMapping(value = {GET_VNF_WORKFLOW_RELATION}, method = RequestMethod.POST)
- public ResponseEntity getWorkflows(@RequestBody GetVnfWorkflowRelationRequest getVnfWorkflowRelationRequest) throws IOException, InterruptedException {
+ public ResponseEntity getWorkflows(@RequestBody GetVnfWorkflowRelationRequest getVnfWorkflowRelationRequest) {
try {
GetWorkflowsResponse response = new GetWorkflowsResponse(changeManagementService.getWorkflowsForVnf(getVnfWorkflowRelationRequest));
return ResponseEntity.status(OK).body(response);
}
@RequestMapping(value = {VNF_WORKFLOW_RELATION}, method = RequestMethod.POST)
- public ResponseEntity createWorkflowRelation(@RequestBody VnfWorkflowRelationRequest vnfWorkflowRelationRequest) throws IOException, InterruptedException {
+ public ResponseEntity createWorkflowRelation(@RequestBody VnfWorkflowRelationRequest vnfWorkflowRelationRequest) {
VnfWorkflowRelationResponse vnfWorkflowRelationResponse;
try {
vnfWorkflowRelationResponse = changeManagementService.addVnfWorkflowRelation(vnfWorkflowRelationRequest);
}
@RequestMapping(value = {VNF_WORKFLOW_RELATION}, method = RequestMethod.GET)
- public ResponseEntity getAllWorkflowRelation() throws IOException, InterruptedException {
+ public ResponseEntity getAllWorkflowRelation() {
try {
VnfWorkflowRelationAllResponse vnfWorkflowRelationAllResponse = changeManagementService.getAllVnfWorkflowRelations();
}
@RequestMapping(value = {VNF_WORKFLOW_RELATION}, method = RequestMethod.DELETE)
- public ResponseEntity deleteWorkflowRelation(@RequestBody VnfWorkflowRelationRequest vnfWorkflowRelationRequest) throws IOException, InterruptedException {
+ public ResponseEntity deleteWorkflowRelation(@RequestBody VnfWorkflowRelationRequest vnfWorkflowRelationRequest) {
VnfWorkflowRelationResponse vnfWorkflowRelationResponse;
try {
vnfWorkflowRelationResponse = changeManagementService.deleteVnfWorkflowRelation(vnfWorkflowRelationRequest);