mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
api: affinitygroup: fix and reformat descriptions
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
This commit is contained in:
parent
4c65acfff7
commit
f17ab71bdf
@ -64,7 +64,7 @@ public class DeleteAffinityGroupCmd extends BaseAsyncCmd {
|
||||
entityType = AffinityGroupResponse.class)
|
||||
private Long id;
|
||||
|
||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the affinity group. Mutually exclusive with id parameter")
|
||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the affinity group. Mutually exclusive with ID parameter")
|
||||
private String name;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
@ -87,12 +87,12 @@ public class DeleteAffinityGroupCmd extends BaseAsyncCmd {
|
||||
if (name != null) {
|
||||
id = _responseGenerator.getAffinityGroupId(name, getEntityOwnerId());
|
||||
if (id == null) {
|
||||
throw new InvalidParameterValueException("Unable to find affinity group by name " + name + " for the account id=" + getEntityOwnerId());
|
||||
throw new InvalidParameterValueException("Unable to find affinity group by name " + name + " for the account ID=" + getEntityOwnerId());
|
||||
}
|
||||
}
|
||||
|
||||
if (id == null) {
|
||||
throw new InvalidParameterValueException("Either id or name parameter is requred by deleteAffinityGroup command");
|
||||
throw new InvalidParameterValueException("Either ID or name parameter is required by deleteAffinityGroup command");
|
||||
}
|
||||
|
||||
return id;
|
||||
|
||||
@ -44,11 +44,11 @@ public class ListAffinityGroupsCmd extends BaseListAccountResourcesCmd {
|
||||
|
||||
@Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID,
|
||||
type = CommandType.UUID,
|
||||
description = "lists affinity groups by virtual machine id",
|
||||
description = "lists affinity groups by virtual machine ID",
|
||||
entityType = UserVmResponse.class)
|
||||
private Long virtualMachineId;
|
||||
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, description = "list the affinity group by the id provided", entityType = AffinityGroupResponse.class)
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, description = "list the affinity group by the ID provided", entityType = AffinityGroupResponse.class)
|
||||
private Long id;
|
||||
|
||||
@Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "lists affinity groups by type")
|
||||
|
||||
@ -138,7 +138,7 @@ public class UpdateVMAffinityGroupCmd extends BaseAsyncCmd {
|
||||
|
||||
@Override
|
||||
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException {
|
||||
CallContext.current().setEventDetails("Vm Id: " + getId());
|
||||
CallContext.current().setEventDetails("VM ID: " + getId());
|
||||
UserVm result = _affinityGroupService.updateVMAffinityGroups(getId(), getAffinityGroupIdList());
|
||||
ArrayList<VMDetails> dc = new ArrayList<VMDetails>();
|
||||
dc.add(VMDetails.valueOf("affgrp"));
|
||||
@ -149,7 +149,7 @@ public class UpdateVMAffinityGroupCmd extends BaseAsyncCmd {
|
||||
response.setResponseName(getCommandName());
|
||||
setResponseObject(response);
|
||||
} else {
|
||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update vm's affinity groups");
|
||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update VM's affinity groups");
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ public class UpdateVMAffinityGroupCmd extends BaseAsyncCmd {
|
||||
|
||||
@Override
|
||||
public String getEventDescription() {
|
||||
return "updating VM Affinity Group";
|
||||
return "updating VM affinity group";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user