change parameter to forcedestroylocalstorage during delete host

This commit is contained in:
Edison Su 2011-06-24 10:13:57 -04:00
parent a24eef5c81
commit 8da6578d76
2 changed files with 6 additions and 6 deletions

View File

@ -64,7 +64,7 @@ public class ApiConstants {
public static final String ENTRY_TIME = "entrytime";
public static final String FIRSTNAME = "firstname";
public static final String FORCED = "forced";
public static final String FORCED_DESTRORY_VM = "forcedestroyvm";
public static final String FORCED_DESTROY_LOCAL_STORAGE = "forcedestroylocalstorage";
public static final String FORMAT = "format";
public static final String FOR_VIRTUAL_NETWORK = "forvirtualnetwork";
public static final String GATEWAY = "gateway";

View File

@ -44,8 +44,8 @@ public class DeleteHostCmd extends BaseCmd {
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, description = "Force delete the host. All HA enabled vms running on the host will be put to HA; HA disabled ones will be stopped")
private Boolean forced;
@Parameter(name = ApiConstants.FORCED_DESTRORY_VM, type = CommandType.BOOLEAN, description = "Force destroy VMs on this host. All VMs created on this local storage will be destroyed")
private Boolean forceDestroyVM;
@Parameter(name = ApiConstants.FORCED_DESTROY_LOCAL_STORAGE, type = CommandType.BOOLEAN, description = "Force destroy local storage on this host. All VMs created on this local storage will be destroyed")
private Boolean forceDestroyLocalStorage;
// ///////////////////////////////////////////////////
// ///////////////// Accessors ///////////////////////
@ -59,8 +59,8 @@ public class DeleteHostCmd extends BaseCmd {
return (forced != null) ? forced : false;
}
public boolean isForceDestoryVM() {
return (forceDestroyVM != null) ? forceDestroyVM : false;
public boolean isForceDestoryLocalStorage() {
return (forceDestroyLocalStorage != null) ? forceDestroyLocalStorage : false;
}
// ///////////////////////////////////////////////////
@ -79,7 +79,7 @@ public class DeleteHostCmd extends BaseCmd {
@Override
public void execute() {
boolean result = _resourceService.deleteHost(getId(), isForced(), isForceDestoryVM());
boolean result = _resourceService.deleteHost(getId(), isForced(), isForceDestoryLocalStorage());
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
this.setResponseObject(response);