api: iso: fix and reformat descriptions

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
This commit is contained in:
Rene Moser 2015-05-21 09:56:13 +02:00 committed by Daan Hoogland
parent 897c73867d
commit a1f58c48ec
10 changed files with 25 additions and 25 deletions

View File

@ -78,7 +78,7 @@ public class AttachIsoCmd extends BaseAsyncCmd {
public long getEntityOwnerId() {
UserVm vm = _entityMgr.findById(UserVm.class, getVirtualMachineId());
if (vm == null) {
throw new InvalidParameterValueException("Unable to find virtual machine by id " + getVirtualMachineId());
throw new InvalidParameterValueException("Unable to find virtual machine by ID " + getVirtualMachineId());
}
return vm.getAccountId();
@ -91,12 +91,12 @@ public class AttachIsoCmd extends BaseAsyncCmd {
@Override
public String getEventDescription() {
return "attaching ISO: " + getId() + " to vm: " + getVirtualMachineId();
return "attaching ISO: " + getId() + " to VM: " + getVirtualMachineId();
}
@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + getVirtualMachineId() + " ISO Id: " + getId());
CallContext.current().setEventDetails("Vm Id: " + getVirtualMachineId() + " ISO ID: " + getId());
boolean result = _templateService.attachIso(id, virtualMachineId);
if (result) {
UserVm userVm = _responseGenerator.findUserVmById(virtualMachineId);
@ -105,10 +105,10 @@ public class AttachIsoCmd extends BaseAsyncCmd {
response.setResponseName(DeployVMCmd.getResultObjectName());
setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to attach iso");
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to attach ISO");
}
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to attach iso");
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to attach ISO");
}
}
}

View File

@ -23,7 +23,7 @@ import org.apache.cloudstack.api.ResponseObject.ResponseView;
import org.apache.cloudstack.api.command.user.template.CopyTemplateCmd;
import org.apache.cloudstack.api.response.TemplateResponse;
@APICommand(name = "copyIso", description = "Copies an iso from one zone to another.", responseObject = TemplateResponse.class, responseView = ResponseView.Restricted,
@APICommand(name = "copyIso", description = "Copies an ISO from one zone to another.", responseObject = TemplateResponse.class, responseView = ResponseView.Restricted,
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
public class CopyIsoCmd extends CopyTemplateCmd {
public static final Logger s_logger = Logger.getLogger(CopyIsoCmd.class.getName());

View File

@ -95,7 +95,7 @@ public class DeleteIsoCmd extends BaseAsyncCmd {
@Override
public String getEventDescription() {
return "Deleting iso " + getId();
return "Deleting ISO " + getId();
}
@Override
@ -116,7 +116,7 @@ public class DeleteIsoCmd extends BaseAsyncCmd {
SuccessResponse response = new SuccessResponse(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete iso");
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete ISO");
}
}
}

View File

@ -70,7 +70,7 @@ public class DetachIsoCmd extends BaseAsyncCmd {
if (vm != null) {
return vm.getAccountId();
} else {
throw new InvalidParameterValueException("Unable to find vm by id " + getVirtualMachineId());
throw new InvalidParameterValueException("Unable to find VM by ID " + getVirtualMachineId());
}
}
@ -81,7 +81,7 @@ public class DetachIsoCmd extends BaseAsyncCmd {
@Override
public String getEventDescription() {
return "detaching ISO from vm: " + getVirtualMachineId();
return "detaching ISO from VM: " + getVirtualMachineId();
}
@Override
@ -93,7 +93,7 @@ public class DetachIsoCmd extends BaseAsyncCmd {
response.setResponseName(DeployVMCmd.getResultObjectName());
setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to detach iso");
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to detach ISO");
}
}
}

View File

@ -49,7 +49,7 @@ public class ExtractIsoCmd extends BaseAsyncCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "the ID of the ISO file")
private Long id;
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = false, description = "the url to which the ISO would be extracted")
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = false, description = "the URL to which the ISO would be extracted")
private String url;
@Parameter(name = ApiConstants.ZONE_ID,
@ -109,7 +109,7 @@ public class ExtractIsoCmd extends BaseAsyncCmd {
@Override
public String getEventDescription() {
return "extracting iso: " + getId() + " from zone: " + getZoneId();
return "extracting ISO: " + getId() + " from zone: " + getZoneId();
}
public static String getStaticName() {
@ -137,7 +137,7 @@ public class ExtractIsoCmd extends BaseAsyncCmd {
response.setObjectName("iso");
this.setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to extract iso");
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to extract ISO");
}
} catch (InternalErrorException ex) {
s_logger.warn("Exception: ", ex);

View File

@ -26,7 +26,7 @@ import org.apache.cloudstack.api.response.TemplatePermissionsResponse;
import com.cloud.storage.Storage.ImageFormat;
import com.cloud.template.VirtualMachineTemplate;
@APICommand(name = "listIsoPermissions", description = "List iso visibility and all accounts that have permissions to view this iso.", responseObject = TemplatePermissionsResponse.class, responseView = ResponseView.Restricted,
@APICommand(name = "listIsoPermissions", description = "List ISO visibility and all accounts that have permissions to view this ISO.", responseObject = TemplatePermissionsResponse.class, responseView = ResponseView.Restricted,
requestHasSensitiveInfo = false,
responseHasSensitiveInfo = false)
public class ListIsoPermissionsCmd extends BaseListTemplateOrIsoPermissionsCmd {

View File

@ -49,7 +49,7 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd {
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "the hypervisor for which to restrict the search")
private String hypervisor;
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "list ISO by id")
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "list ISO by ID")
private Long id;
@Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "true if the ISO is publicly available to all users, false otherwise.")
@ -69,7 +69,7 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd {
+ "* community : templates that have been marked as public but not featured. " + "* all : all templates (only usable by admins).")
private String isoFilter = TemplateFilter.selfexecutable.toString();
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list all isos by name")
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list all ISOs by name")
private String isoName;
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the ID of the zone")

View File

@ -66,7 +66,7 @@ public class RegisterIsoCmd extends BaseCmd {
description = "true if you want to register the ISO to be publicly available to all users, false otherwise.")
private Boolean publicIso;
@Parameter(name = ApiConstants.IS_EXTRACTABLE, type = CommandType.BOOLEAN, description = "true if the iso or its derivatives are extractable; default is false")
@Parameter(name = ApiConstants.IS_EXTRACTABLE, type = CommandType.BOOLEAN, description = "true if the ISO or its derivatives are extractable; default is false")
private Boolean extractable;
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the ISO")
@ -75,7 +75,7 @@ public class RegisterIsoCmd extends BaseCmd {
@Parameter(name = ApiConstants.OS_TYPE_ID,
type = CommandType.UUID,
entityType = GuestOSResponse.class,
description = "the ID of the OS Type that best represents the OS of this ISO. If the iso is bootable this parameter needs to be passed")
description = "the ID of the OS type that best represents the OS of this ISO. If the ISO is bootable this parameter needs to be passed")
private Long osTypeId;
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "the URL to where the ISO is currently being hosted")
@ -97,15 +97,15 @@ public class RegisterIsoCmd extends BaseCmd {
@Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "the MD5 checksum value of this ISO")
private String checksum;
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Register iso for the project")
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Register ISO for the project")
private Long projectId;
@Parameter(name = ApiConstants.IMAGE_STORE_UUID, type = CommandType.STRING, description = "Image store uuid")
@Parameter(name = ApiConstants.IMAGE_STORE_UUID, type = CommandType.STRING, description = "Image store UUID")
private String imageStoreUuid;
@Parameter(name = ApiConstants.IS_DYNAMICALLY_SCALABLE,
type = CommandType.BOOLEAN,
description = "true if iso contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory")
description = "true if ISO contains XS/VMWare tools inorder to support dynamic scaling of VM CPU/memory")
protected Boolean isDynamicallyScalable;
/////////////////////////////////////////////////////
@ -197,7 +197,7 @@ public class RegisterIsoCmd extends BaseCmd {
response.setResponseName(getCommandName());
setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to register iso");
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to register ISO");
}
}

View File

@ -80,7 +80,7 @@ public class UpdateIsoCmd extends BaseUpdateTemplateOrIsoCmd {
response.setResponseName(getCommandName());
setResponseObject(response);
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update iso");
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update ISO");
}
}
}

View File

@ -25,7 +25,7 @@ import org.apache.cloudstack.api.response.SuccessResponse;
import com.cloud.template.VirtualMachineTemplate;
import com.cloud.user.Account;
@APICommand(name = "updateIsoPermissions", description = "Updates iso permissions", responseObject = SuccessResponse.class,
@APICommand(name = "updateIsoPermissions", description = "Updates ISO permissions", responseObject = SuccessResponse.class,
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
public class UpdateIsoPermissionsCmd extends BaseUpdateTemplateOrIsoPermissionsCmd {
@Override