diff --git a/server/src/com/cloud/api/commands/StartSystemVm2Cmd.java b/server/src/com/cloud/api/commands/StartSystemVm2Cmd.java index 86fc5dc2049..dfd1cb677b5 100644 --- a/server/src/com/cloud/api/commands/StartSystemVm2Cmd.java +++ b/server/src/com/cloud/api/commands/StartSystemVm2Cmd.java @@ -93,17 +93,11 @@ public class StartSystemVm2Cmd extends BaseAsyncCmd { return "starting system vm: " + getId(); } - @Override @SuppressWarnings("unchecked") - public SystemVmResponse getResponse() { - VMInstanceVO instance = (VMInstanceVO)getResponseObject(); - SystemVmResponse response = ApiResponseHelper.createSystemVmResponse(instance); - response.setResponseName(getName()); - return response; - } - @Override - public Object execute() throws ServerApiException, InvalidParameterValueException, PermissionDeniedException, InsufficientAddressCapacityException, InsufficientCapacityException, ConcurrentOperationException{ - VirtualMachine result = _mgr.startSystemVm(this); - return result; - } + public void execute() throws ServerApiException, InvalidParameterValueException, PermissionDeniedException, InsufficientAddressCapacityException, InsufficientCapacityException, ConcurrentOperationException{ + VirtualMachine instance = _mgr.startSystemVm(this); + SystemVmResponse response = ApiResponseHelper.createSystemVmResponse((VMInstanceVO)instance); + response.setResponseName(getName()); + this.setResponseObject(response); + } } diff --git a/server/src/com/cloud/api/commands/StopSystemVm2Cmd.java b/server/src/com/cloud/api/commands/StopSystemVm2Cmd.java index e869d9ea88d..90a341ed3d9 100644 --- a/server/src/com/cloud/api/commands/StopSystemVm2Cmd.java +++ b/server/src/com/cloud/api/commands/StopSystemVm2Cmd.java @@ -89,17 +89,10 @@ public class StopSystemVm2Cmd extends BaseAsyncCmd { return "stopping system vm: " + getId(); } - @Override @SuppressWarnings("unchecked") - public SystemVmResponse getResponse() { - VMInstanceVO instance = (VMInstanceVO)getResponseObject(); - SystemVmResponse response = ApiResponseHelper.createSystemVmResponse(instance); - response.setResponseName(getName()); - return response; - } - @Override - public Object execute() throws ServerApiException, InvalidParameterValueException, PermissionDeniedException, InsufficientAddressCapacityException, InsufficientCapacityException, ConcurrentOperationException{ - VirtualMachine result = _mgr.stopSystemVm(this); - return result; + public void execute() throws ServerApiException, InvalidParameterValueException, PermissionDeniedException, InsufficientAddressCapacityException, InsufficientCapacityException, ConcurrentOperationException{ + VirtualMachine instance = _mgr.stopSystemVm(this); + SystemVmResponse response = ApiResponseHelper.createSystemVmResponse((VMInstanceVO)instance); + response.setResponseName(getName()); } }