api: account: fix and reformat descriptions

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
This commit is contained in:
Rene Moser 2015-05-21 09:36:27 +02:00 committed by Daan Hoogland
parent 5cd35a2237
commit 68e867f0c6
4 changed files with 9 additions and 9 deletions

View File

@ -32,7 +32,7 @@ import com.cloud.event.EventTypes;
import com.cloud.exception.InvalidParameterValueException;
import com.cloud.projects.Project;
@APICommand(name = "addAccountToProject", description = "Adds acoount to a project", responseObject = SuccessResponse.class, since = "3.0.0",
@APICommand(name = "addAccountToProject", description = "Adds account to a project", responseObject = SuccessResponse.class, since = "3.0.0",
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
public class AddAccountToProjectCmd extends BaseAsyncCmd {
public static final Logger s_logger = Logger.getLogger(AddAccountToProjectCmd.class.getName());
@ -47,7 +47,7 @@ public class AddAccountToProjectCmd extends BaseAsyncCmd {
type = CommandType.UUID,
entityType = ProjectResponse.class,
required = true,
description = "id of the project to add the account to")
description = "ID of the project to add the account to")
private Long projectId;
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "name of the account to be added to the project")
@ -87,7 +87,7 @@ public class AddAccountToProjectCmd extends BaseAsyncCmd {
throw new InvalidParameterValueException("Either accountName or email is required");
}
CallContext.current().setEventDetails("Project id: " + projectId + "; accountName " + accountName);
CallContext.current().setEventDetails("Project ID: " + projectId + "; accountName " + accountName);
boolean result = _projectService.addAccountToProject(getProjectId(), getAccountName(), getEmail());
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
@ -102,7 +102,7 @@ public class AddAccountToProjectCmd extends BaseAsyncCmd {
Project project = _projectService.getProject(getProjectId());
//verify input parameters
if (project == null) {
InvalidParameterValueException ex = new InvalidParameterValueException("Unable to find project with specified id");
InvalidParameterValueException ex = new InvalidParameterValueException("Unable to find project with specified ID");
ex.addProxyObject(getProjectId().toString(), "projectId");
throw ex;
}

View File

@ -47,7 +47,7 @@ public class DeleteAccountFromProjectCmd extends BaseAsyncCmd {
type = CommandType.UUID,
entityType = ProjectResponse.class,
required = true,
description = "id of the project to remove the account from")
description = "ID of the project to remove the account from")
private Long projectId;
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, required = true, description = "name of the account to be removed from the project")
@ -76,7 +76,7 @@ public class DeleteAccountFromProjectCmd extends BaseAsyncCmd {
@Override
public void execute() {
CallContext.current().setEventDetails("Project id: " + projectId + "; accountName " + accountName);
CallContext.current().setEventDetails("Project ID: " + projectId + "; accountName " + accountName);
boolean result = _projectService.deleteAccountFromProject(projectId, accountName);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
@ -91,7 +91,7 @@ public class DeleteAccountFromProjectCmd extends BaseAsyncCmd {
Project project = _projectService.getProject(projectId);
//verify input parameters
if (project == null) {
throw new InvalidParameterValueException("Unable to find project by id " + projectId);
throw new InvalidParameterValueException("Unable to find project by ID " + projectId);
}
return _projectService.getProjectOwner(projectId).getId();

View File

@ -46,7 +46,7 @@ public class ListAccountsCmd extends BaseListDomainResourcesCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "list account by account ID")
private Long id;
@Parameter(name = ApiConstants.IS_CLEANUP_REQUIRED, type = CommandType.BOOLEAN, description = "list accounts by cleanuprequred attribute (values are true or false)")
@Parameter(name = ApiConstants.IS_CLEANUP_REQUIRED, type = CommandType.BOOLEAN, description = "list accounts by cleanuprequired attribute (values are true or false)")
private Boolean cleanupRequired;
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list account by account name")

View File

@ -39,7 +39,7 @@ public class ListProjectAccountsCmd extends BaseListCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "id of the project")
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "ID of the project")
private Long projectId;
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "list accounts of the project by account name")