Skip to content

Commit 0700cb7

Browse files
committed
rename CreateConditionCmd class to CreateConditionForVmAutoScalingCmd
1 parent 2dbc86a commit 0700cb7

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;
@@ -76,7 +76,7 @@ public interface AutoScaleService {
7676

7777
List<? extends Counter> listCounters(ListCountersCmd cmd);
7878

79-
Condition createCondition(CreateConditionCmd cmd);
79+
Condition createCondition(CreateConditionForVmAutoScalingCmd cmd);
8080

8181
List<? extends Condition> listConditions(ListConditionsCmd cmd);
8282

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;
@@ -1493,7 +1493,7 @@ public Counter getCounter(long counterId) {
14931493

14941494
@Override
14951495
@ActionEvent(eventType = EventTypes.EVENT_CONDITION_CREATE, eventDescription = "Condition", create = true)
1496-
public Condition createCondition(CreateConditionCmd cmd) {
1496+
public Condition createCondition(CreateConditionForVmAutoScalingCmd cmd) {
14971497
Account caller = CallContext.current().getCallingAccount();
14981498
Account owner = accountMgr.finalizeOwner(caller, cmd.getAccountName(), cmd.getDomainId(), cmd.getProjectId());
14991499
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
@@ -360,7 +360,7 @@
360360
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScalePolicyCmd;
361361
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScaleVmGroupCmd;
362362
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScaleVmProfileCmd;
363-
import org.apache.cloudstack.api.command.user.autoscale.CreateConditionCmd;
363+
import org.apache.cloudstack.api.command.user.autoscale.CreateConditionForVmAutoScalingCmd;
364364
import org.apache.cloudstack.api.command.user.autoscale.DeleteAutoScalePolicyCmd;
365365
import org.apache.cloudstack.api.command.user.autoscale.DeleteAutoScaleVmGroupCmd;
366366
import org.apache.cloudstack.api.command.user.autoscale.DeleteAutoScaleVmProfileCmd;
@@ -3859,7 +3859,7 @@ public List<Class<?>> getCommands() {
38593859
cmdList.add(CreateAutoScalePolicyCmd.class);
38603860
cmdList.add(CreateAutoScaleVmGroupCmd.class);
38613861
cmdList.add(CreateAutoScaleVmProfileCmd.class);
3862-
cmdList.add(CreateConditionCmd.class);
3862+
cmdList.add(CreateConditionForVmAutoScalingCmd.class);
38633863
cmdList.add(DeleteAutoScalePolicyCmd.class);
38643864
cmdList.add(DeleteAutoScaleVmGroupCmd.class);
38653865
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)