compilation errors fixed

This commit is contained in:
Alex Huang 2010-11-11 10:37:56 -08:00
parent 94250c1330
commit 284720bf00
2 changed files with 10 additions and 23 deletions

View File

@ -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);
}
}

View File

@ -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());
}
}