Skip to content

Commit a8645f3

Browse files
committed
rename CreateConditionCmd class to CreateConditionForVmAutoScalingCmd
1 parent b0c7719 commit a8645f3

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

api/src/main/java/com/cloud/network/as/AutoScaleService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScalePolicyCmd;
2323
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScaleVmGroupCmd;
2424
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScaleVmProfileCmd;
25-
import org.apache.cloudstack.api.command.user.autoscale.CreateConditionCmd;
25+
import org.apache.cloudstack.api.command.user.autoscale.CreateConditionForVmAutoScalingCmd;
2626
import org.apache.cloudstack.api.command.user.autoscale.ListAutoScalePoliciesCmd;
2727
import org.apache.cloudstack.api.command.user.autoscale.ListAutoScaleVmGroupsCmd;
2828
import org.apache.cloudstack.api.command.user.autoscale.ListAutoScaleVmProfilesCmd;
@@ -74,7 +74,7 @@ public interface AutoScaleService {
7474

7575
List<? extends Counter> listCounters(ListCountersCmd cmd);
7676

77-
Condition createCondition(CreateConditionCmd cmd);
77+
Condition createCondition(CreateConditionForVmAutoScalingCmd cmd);
7878

7979
List<? extends Condition> listConditions(ListConditionsCmd cmd);
8080

api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateConditionCmd.java renamed to api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateConditionForVmAutoScalingCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
@APICommand(name = "createCondition", description = "Creates a condition for VM auto scaling", responseObject = ConditionResponse.class, entityType = {Condition.class},
3939
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
40-
public class CreateConditionCmd extends BaseAsyncCreateCmd {
40+
public class CreateConditionForVmAutoScalingCmd extends BaseAsyncCreateCmd {
4141
private static final String s_name = "conditionresponse";
4242

4343
// ///////////////////////////////////////////////////

server/src/main/java/com/cloud/network/as/AutoScaleManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScalePolicyCmd;
5555
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScaleVmGroupCmd;
5656
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScaleVmProfileCmd;
57-
import org.apache.cloudstack.api.command.user.autoscale.CreateConditionCmd;
57+
import org.apache.cloudstack.api.command.user.autoscale.CreateConditionForVmAutoScalingCmd;
5858
import org.apache.cloudstack.api.command.user.autoscale.ListAutoScalePoliciesCmd;
5959
import org.apache.cloudstack.api.command.user.autoscale.ListAutoScaleVmGroupsCmd;
6060
import org.apache.cloudstack.api.command.user.autoscale.ListAutoScaleVmProfilesCmd;
@@ -1482,7 +1482,7 @@ public Counter createCounter(CreateCounterCmd cmd) {
14821482

14831483
@Override
14841484
@ActionEvent(eventType = EventTypes.EVENT_CONDITION_CREATE, eventDescription = "Condition", create = true)
1485-
public Condition createCondition(CreateConditionCmd cmd) {
1485+
public Condition createCondition(CreateConditionForVmAutoScalingCmd cmd) {
14861486
Account caller = CallContext.current().getCallingAccount();
14871487
Account owner = accountMgr.finalizeOwner(caller, cmd.getAccountName(), cmd.getDomainId(), cmd.getProjectId());
14881488
accountMgr.checkAccess(caller, null, true, owner);

server/src/main/java/com/cloud/server/ManagementServerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@
373373
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScalePolicyCmd;
374374
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScaleVmGroupCmd;
375375
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScaleVmProfileCmd;
376-
import org.apache.cloudstack.api.command.user.autoscale.CreateConditionCmd;
376+
import org.apache.cloudstack.api.command.user.autoscale.CreateConditionForVmAutoScalingCmd;
377377
import org.apache.cloudstack.api.command.user.autoscale.DeleteAutoScalePolicyCmd;
378378
import org.apache.cloudstack.api.command.user.autoscale.DeleteAutoScaleVmGroupCmd;
379379
import org.apache.cloudstack.api.command.user.autoscale.DeleteAutoScaleVmProfileCmd;
@@ -3885,7 +3885,7 @@ public List<Class<?>> getCommands() {
38853885
cmdList.add(CreateAutoScalePolicyCmd.class);
38863886
cmdList.add(CreateAutoScaleVmGroupCmd.class);
38873887
cmdList.add(CreateAutoScaleVmProfileCmd.class);
3888-
cmdList.add(CreateConditionCmd.class);
3888+
cmdList.add(CreateConditionForVmAutoScalingCmd.class);
38893889
cmdList.add(DeleteAutoScalePolicyCmd.class);
38903890
cmdList.add(DeleteAutoScaleVmGroupCmd.class);
38913891
cmdList.add(DeleteAutoScaleVmProfileCmd.class);

server/src/test/java/com/cloud/network/as/AutoScaleManagerImplTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScalePolicyCmd;
5454
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScaleVmGroupCmd;
5555
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScaleVmProfileCmd;
56-
import org.apache.cloudstack.api.command.user.autoscale.CreateConditionCmd;
56+
import org.apache.cloudstack.api.command.user.autoscale.CreateConditionForVmAutoScalingCmd;
5757
import org.apache.cloudstack.api.command.user.autoscale.ListCountersCmd;
5858
import org.apache.cloudstack.api.command.user.autoscale.UpdateAutoScaleVmGroupCmd;
5959
import org.apache.cloudstack.api.command.user.autoscale.UpdateAutoScaleVmProfileCmd;
@@ -514,8 +514,8 @@ public void testDeleteCounterWithUsedCounter() throws ResourceInUseException {
514514
}
515515

516516
@Test
517-
public void testCreateConditionCmd() throws IllegalArgumentException {
518-
CreateConditionCmd cmd = new CreateConditionCmd();
517+
public void testCreateConditionForVmAutoScalingCmd() throws IllegalArgumentException {
518+
CreateConditionForVmAutoScalingCmd cmd = new CreateConditionForVmAutoScalingCmd();
519519

520520
ReflectionTestUtils.setField(cmd, "counterId", counterId);
521521
ReflectionTestUtils.setField(cmd, "relationalOperator", String.valueOf(relationalOperator));
@@ -528,8 +528,8 @@ public void testCreateConditionCmd() throws IllegalArgumentException {
528528
}
529529

530530
@Test(expected = InvalidParameterValueException.class)
531-
public void testCreateConditionCmdWithInvalidOperator() throws IllegalArgumentException {
532-
CreateConditionCmd cmd = new CreateConditionCmd();
531+
public void testCreateConditionForVmAutoScalingCmdWithInvalidOperator() throws IllegalArgumentException {
532+
CreateConditionForVmAutoScalingCmd cmd = new CreateConditionForVmAutoScalingCmd();
533533

534534
ReflectionTestUtils.setField(cmd, "counterId", counterId);
535535
ReflectionTestUtils.setField(cmd, "relationalOperator", INVALID);
@@ -541,8 +541,8 @@ public void testCreateConditionCmdWithInvalidOperator() throws IllegalArgumentEx
541541
}
542542

543543
@Test(expected = InvalidParameterValueException.class)
544-
public void testCreateConditionCmdWithInvalidThreshold() throws IllegalArgumentException {
545-
CreateConditionCmd cmd = new CreateConditionCmd();
544+
public void testCreateConditionForVmAutoScalingCmdWithInvalidThreshold() throws IllegalArgumentException {
545+
CreateConditionForVmAutoScalingCmd cmd = new CreateConditionForVmAutoScalingCmd();
546546

547547
ReflectionTestUtils.setField(cmd, "counterId", counterId);
548548
ReflectionTestUtils.setField(cmd, "relationalOperator", String.valueOf(relationalOperator));

0 commit comments

Comments
 (0)