Skip to content

Commit c3d3331

Browse files
committed
address comments; consistent API description
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent fb2fca4 commit c3d3331

19 files changed

Lines changed: 132 additions & 91 deletions

api/src/main/java/org/apache/cloudstack/api/command/user/bootgroup/AddMemberToInstanceBootGroupCmd.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
import org.apache.cloudstack.vm.bootgroup.InstanceBootGroupService;
3838

3939
@APICommand(name = "addMemberToInstanceBootGroup",
40-
description = "Adds a VM or instance group to an instance boot group. Exactly one of virtualmachineid or instancegroupid must be specified.",
40+
description = "Adds an Instance or instance group to an instance boot group. Exactly one of virtualmachineid or instancegroupid must be specified.",
4141
responseObject = InstanceBootGroupMemberResponse.class,
4242
entityType = {InstanceBootGroupMember.class},
4343
requestHasSensitiveInfo = false,
@@ -51,15 +51,15 @@ public class AddMemberToInstanceBootGroupCmd extends BaseCmd implements UserCmd
5151
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceBootGroupResponse.class, required = true, description = "The ID of the instance boot group")
5252
private Long id;
5353

54-
@Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "The ID of the VM to add (exclusive with instancegroupid)")
54+
@Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "The ID of the Instance to add (exclusive with instancegroupid)")
5555
private Long virtualMachineId;
5656

57-
@Parameter(name = ApiConstants.INSTANCE_GROUP_ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class, description = "The ID of the instance group to add (exclusive with virtualmachineid)")
57+
@Parameter(name = ApiConstants.INSTANCE_GROUP_ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class, description = "The ID of the Instance Group to add (exclusive with virtualmachineid)")
5858
private Long instanceGroupId;
5959

6060
@Parameter(name = ApiConstants.BOOT_ORDER, type = CommandType.INTEGER, required = true,
6161
description = "The boot order value for this member (0 or greater; non-contiguous values are allowed). "
62-
+ "Any existing member already at or past this value is shifted one slot later to make room.")
62+
+ "Any existing member already at or past this value is shifted one slot later to make room")
6363
private int order;
6464

6565
public Long getId() {

api/src/main/java/org/apache/cloudstack/api/command/user/bootgroup/CreateInstanceBootGroupCmd.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import org.apache.cloudstack.vm.bootgroup.InstanceBootGroupService;
3737

3838
@APICommand(name = "createInstanceBootGroup",
39-
description = "Creates an instance boot group",
39+
description = "Creates an Instance Boot Group",
4040
responseObject = InstanceBootGroupResponse.class,
4141
entityType = {InstanceBootGroup.class},
4242
requestHasSensitiveInfo = false,
@@ -47,19 +47,19 @@ public class CreateInstanceBootGroupCmd extends BaseCmd implements UserCmd {
4747
@Inject
4848
InstanceBootGroupService instanceBootGroupService;
4949

50-
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the instance boot group")
50+
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the Instance Boot Group")
5151
private String name;
5252

53-
@Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "The description of the instance boot group")
53+
@Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "The description of the Instance Boot Group")
5454
private String description;
5555

56-
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "The account of the instance boot group. Must be used with domainId.")
56+
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "The account of the Instance Boot Group. Must be used with domainid")
5757
private String accountName;
5858

59-
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "The domain ID of the account owning the instance boot group")
59+
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "The domain ID of the account owning the Instance Boot Group")
6060
private Long domainId;
6161

62-
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "The project of the instance boot group")
62+
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "The project of the Instance Boot Group")
6363
private Long projectId;
6464

6565
@Parameter(name = ApiConstants.READINESS_ATTEMPT_TIMEOUT_SECONDS, type = CommandType.LONG,

api/src/main/java/org/apache/cloudstack/api/command/user/bootgroup/CreateInstanceBootGroupReadinessRuleCmd.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
4040
import org.apache.cloudstack.vm.bootgroup.InstanceBootGroupService;
4141

4242
@APICommand(name = "createInstanceBootGroupReadinessRule",
43-
description = "Creates a readiness rule for a VM or instance group that is a member (directly, or via its instance group) of an instance boot group. " +
44-
"Exactly one of virtualmachineid or instancegroupid must be specified.",
43+
description = "Creates a readiness rule for an Instance or Instance Group that is a member (directly, or via its instance group) of an Instance Boot Group",
4544
responseObject = InstanceBootGroupReadinessRuleResponse.class,
4645
entityType = {InstanceBootGroupReadinessRule.class},
4746
requestHasSensitiveInfo = false,
@@ -53,15 +52,15 @@ public class CreateInstanceBootGroupReadinessRuleCmd extends BaseCmd implements
5352
InstanceBootGroupService instanceBootGroupService;
5453

5554
@Parameter(name = ApiConstants.BOOT_GROUP_ID, type = CommandType.UUID, entityType = InstanceBootGroupResponse.class, required = true,
56-
description = "The ID of the boot group this rule belongs to")
55+
description = "The ID of the Instance Boot Group this rule belongs to")
5756
private Long bootGroupId;
5857

5958
@Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class,
60-
description = "The ID of the VM this rule applies to (exclusive with instancegroupid)")
59+
description = "The ID of the Instance this rule applies to (exclusive with instancegroupid)")
6160
private Long virtualMachineId;
6261

6362
@Parameter(name = ApiConstants.INSTANCE_GROUP_ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class,
64-
description = "The ID of the instance group this rule applies to (exclusive with virtualmachineid)")
63+
description = "The ID of the Instance Group this rule applies to (exclusive with virtualmachineid)")
6564
private Long instanceGroupId;
6665

6766
@Parameter(name = ApiConstants.RULE_TYPE, type = CommandType.STRING, required = true,

api/src/main/java/org/apache/cloudstack/api/command/user/bootgroup/DeleteInstanceBootGroupCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import org.apache.cloudstack.vm.bootgroup.InstanceBootGroupService;
3636

3737
@APICommand(name = "deleteInstanceBootGroup",
38-
description = "Deletes an instance boot group",
38+
description = "Deletes an Instance Boot Group",
3939
responseObject = SuccessResponse.class,
4040
entityType = {InstanceBootGroup.class},
4141
requestHasSensitiveInfo = false,
@@ -46,7 +46,7 @@ public class DeleteInstanceBootGroupCmd extends BaseCmd implements UserCmd {
4646
@Inject
4747
InstanceBootGroupService instanceBootGroupService;
4848

49-
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceBootGroupResponse.class, required = true, description = "The ID of the instance boot group")
49+
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceBootGroupResponse.class, required = true, description = "The ID of the Instance Boot Group")
5050
private Long id;
5151

5252
public Long getId() {

api/src/main/java/org/apache/cloudstack/api/command/user/bootgroup/DeleteInstanceBootGroupReadinessRuleCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import org.apache.cloudstack.vm.bootgroup.InstanceBootGroupService;
3636

3737
@APICommand(name = "deleteInstanceBootGroupReadinessRule",
38-
description = "Deletes an instance boot group readiness rule",
38+
description = "Deletes an Instance Boot Group readiness rule",
3939
responseObject = SuccessResponse.class,
4040
entityType = {InstanceBootGroupReadinessRule.class},
4141
requestHasSensitiveInfo = false,
@@ -47,7 +47,7 @@ public class DeleteInstanceBootGroupReadinessRuleCmd extends BaseCmd implements
4747
InstanceBootGroupService instanceBootGroupService;
4848

4949
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceBootGroupReadinessRuleResponse.class, required = true,
50-
description = "The ID of the readiness rule")
50+
description = "The ID of the Instance Boot Group readiness rule")
5151
private Long id;
5252

5353
public Long getId() {

api/src/main/java/org/apache/cloudstack/api/command/user/bootgroup/ListInstanceBootGroupMembersCmd.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import org.apache.cloudstack.vm.bootgroup.InstanceBootGroupService;
3737

3838
@APICommand(name = "listInstanceBootGroupMembers",
39-
description = "Lists members of an instance boot group, sorted by boot order",
39+
description = "Lists members of an Instance Boot Group, sorted by boot order",
4040
responseObject = InstanceBootGroupMemberResponse.class,
4141
entityType = {InstanceBootGroupMember.class},
4242
requestHasSensitiveInfo = false,
@@ -47,7 +47,7 @@ public class ListInstanceBootGroupMembersCmd extends BaseListCmd implements User
4747
@Inject
4848
InstanceBootGroupService instanceBootGroupService;
4949

50-
@Parameter(name = ApiConstants.BOOT_GROUP_ID, type = CommandType.UUID, required = true, entityType = InstanceBootGroupResponse.class, description = "The ID of the instance boot group")
50+
@Parameter(name = ApiConstants.BOOT_GROUP_ID, type = CommandType.UUID, required = true, entityType = InstanceBootGroupResponse.class, description = "The ID of the Instance Boot Group")
5151
private Long bootGroupId;
5252

5353
@Parameter(name = ApiConstants.MEMBER_TYPE, type = CommandType.STRING, description = "Filter by member type: VirtualMachine or InstanceGroup")
@@ -58,12 +58,12 @@ public class ListInstanceBootGroupMembersCmd extends BaseListCmd implements User
5858
collectionType = CommandType.STRING,
5959
description = "Comma separated list of additional details requested, value can be a list of [all, readiness, children]. "
6060
+ "Readiness fields are computed from cached check results (not a live re-check) and are omitted unless requested, since computing them is not free. "
61-
+ "Children returns the member VMs of InstanceGroup-type members (omitted for VirtualMachine-type members); combine with readiness to also include per-child readiness.")
61+
+ "Children returns the member Instances of InstanceGroup-type members (omitted for VirtualMachine-type members); combine with readiness to also include per-child readiness")
6262
private List<String> viewDetails;
6363

6464
@Parameter(name = ApiConstants.IGNORE_INSTANCE_STATE, type = CommandType.BOOLEAN,
6565
description = "If true, readiness status/message reflect the last cached rule check regardless of the member's current instance state. "
66-
+ "If false (default), a VM that isn't Running is always reported NotReady, even if its rules were last cached Ready.")
66+
+ "If false (default), an Instance that isn't Running is always reported NotReady, even if its rules were last cached Ready")
6767
private Boolean ignoreInstanceState;
6868

6969
public Long getBootGroupId() {

api/src/main/java/org/apache/cloudstack/api/command/user/bootgroup/ListInstanceBootGroupReadinessRulesCmd.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import org.apache.cloudstack.vm.bootgroup.InstanceBootGroupService;
3535

3636
@APICommand(name = "listInstanceBootGroupReadinessRules",
37-
description = "Lists readiness rules for an instance boot group",
37+
description = "Lists readiness rules for an Instance Boot Group",
3838
responseObject = InstanceBootGroupReadinessRuleResponse.class,
3939
entityType = {InstanceBootGroupReadinessRule.class},
4040
requestHasSensitiveInfo = false,
@@ -46,16 +46,16 @@ public class ListInstanceBootGroupReadinessRulesCmd extends BaseListCmd implemen
4646
InstanceBootGroupService instanceBootGroupService;
4747

4848
@Parameter(name = ApiConstants.BOOT_GROUP_ID, type = CommandType.UUID, entityType = InstanceBootGroupResponse.class, required = true,
49-
description = "The ID of the instance boot group; listing is always scoped to one boot group")
49+
description = "The ID of the Instance Boot Group; listing is always scoped to one boot group")
5050
private Long bootGroupId;
5151

5252
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceBootGroupReadinessRuleResponse.class, description = "List by readiness rule ID")
5353
private Long id;
5454

55-
@Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "Narrow to this VM's rules")
55+
@Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "List rules for the Instance")
5656
private Long virtualMachineId;
5757

58-
@Parameter(name = ApiConstants.INSTANCE_GROUP_ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class, description = "Narrow to this instance group's rules")
58+
@Parameter(name = ApiConstants.INSTANCE_GROUP_ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class, description = "List rules for the Instance Group")
5959
private Long instanceGroupId;
6060

6161
@Parameter(name = ApiConstants.RULE_TYPE, type = CommandType.STRING, description = "Filter by readiness rule type")

api/src/main/java/org/apache/cloudstack/api/command/user/bootgroup/ListInstanceBootGroupsCmd.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import org.apache.cloudstack.vm.bootgroup.InstanceBootGroupService;
3434

3535
@APICommand(name = "listInstanceBootGroups",
36-
description = "Lists instance boot groups",
36+
description = "Lists Instance Boot Groups",
3737
responseObject = InstanceBootGroupResponse.class,
3838
entityType = {InstanceBootGroup.class},
3939
requestHasSensitiveInfo = false,
@@ -44,16 +44,16 @@ public class ListInstanceBootGroupsCmd extends BaseListProjectAndAccountResource
4444
@Inject
4545
InstanceBootGroupService instanceBootGroupService;
4646

47-
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceBootGroupResponse.class, description = "List instance boot groups by ID")
47+
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceBootGroupResponse.class, description = "List Instance Boot Group by ID")
4848
private Long id;
4949

50-
@Parameter(name = ApiConstants.KEYWORD, type = CommandType.STRING, description = "List instance boot groups by name keyword")
50+
@Parameter(name = ApiConstants.KEYWORD, type = CommandType.STRING, description = "List Instance Boot Groups by name keyword")
5151
private String keyword;
5252

53-
@Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "List boot groups that contain this VM")
53+
@Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "List Instance Boot Groups that contain the Instance")
5454
private Long virtualMachineId;
5555

56-
@Parameter(name = ApiConstants.INSTANCE_GROUP_ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class, description = "List boot groups that contain this instance group")
56+
@Parameter(name = ApiConstants.INSTANCE_GROUP_ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class, description = "List Instance Boot Groups that contain the Instance Group")
5757
private Long instanceGroupId;
5858

5959
public Long getId() {

api/src/main/java/org/apache/cloudstack/api/command/user/bootgroup/RebootInstanceBootGroupCmd.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
import com.cloud.utils.exception.CloudRuntimeException;
3838

3939
@APICommand(name = "rebootInstanceBootGroup",
40-
description = "Reboots all VMs in an instance boot group: stops in reverse order then starts in forward order.",
40+
description = "Reboots all VMs in an Instance Boot Group: stops in reverse order then starts in forward order",
4141
responseObject = InstanceBootGroupResponse.class,
4242
entityType = {InstanceBootGroup.class},
4343
requestHasSensitiveInfo = false,
@@ -48,11 +48,11 @@ public class RebootInstanceBootGroupCmd extends BaseAsyncCmd implements UserCmd
4848
@Inject
4949
InstanceBootGroupService instanceBootGroupService;
5050

51-
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceBootGroupResponse.class, required = true, description = "The ID of the instance boot group")
51+
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceBootGroupResponse.class, required = true, description = "The ID of the Instance Boot Group")
5252
private Long id;
5353

5454
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false,
55-
description = "Force stop every Instance in the instance boot group during the stop phase of the reboot (It is force-stopped and then started)")
55+
description = "Whether to force stop every Instance in the Instance Boot Group during the stop phase of the reboot (It is force-stopped and then started)")
5656
private Boolean forced;
5757

5858
public Long getId() {
@@ -75,7 +75,7 @@ public String getEventType() {
7575

7676
@Override
7777
public String getEventDescription() {
78-
return "Rebooting instance boot group with ID: " + getResourceUuid(ApiConstants.ID);
78+
return "Rebooting Instance Boot Group with ID: " + getResourceUuid(ApiConstants.ID);
7979
}
8080

8181
@Override

api/src/main/java/org/apache/cloudstack/api/command/user/bootgroup/RemoveInstanceBootGroupMemberCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import org.apache.cloudstack.vm.bootgroup.InstanceBootGroupService;
3636

3737
@APICommand(name = "removeInstanceBootGroupMember",
38-
description = "Removes a member (VM or instance group) from an instance boot group",
38+
description = "Removes a member from an Instance Boot Group",
3939
responseObject = SuccessResponse.class,
4040
entityType = {InstanceBootGroupMember.class},
4141
requestHasSensitiveInfo = false,
@@ -46,7 +46,7 @@ public class RemoveInstanceBootGroupMemberCmd extends BaseCmd implements UserCmd
4646
@Inject
4747
InstanceBootGroupService instanceBootGroupService;
4848

49-
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceBootGroupMemberResponse.class, required = true, description = "The ID of the boot group member entry to remove")
49+
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceBootGroupMemberResponse.class, required = true, description = "The ID of the Instance Boot Group member to remove")
5050
private Long id;
5151

5252
public Long getId() {

0 commit comments

Comments
 (0)