You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2013/07/30 23:31:28 UTC
git commit: updated refs/heads/4.2 to 026cca4
Updated Branches:
refs/heads/4.2 452722736 -> 026cca46c
CLOUDSTACK-3948: fixed createAutoscaleVmProfile - for situation when no autoscaleUserId is passed in, take it from caller user id, not caller account id
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/026cca46
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/026cca46
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/026cca46
Branch: refs/heads/4.2
Commit: 026cca46c65ee50505dd7f839542315eac55373c
Parents: 4527227
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Tue Jul 30 14:11:29 2013 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Tue Jul 30 14:31:22 2013 -0700
----------------------------------------------------------------------
.../command/user/autoscale/CreateAutoScaleVmProfileCmd.java | 4 ++--
server/src/com/cloud/network/as/AutoScaleManagerImpl.java | 6 +-----
2 files changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/026cca46/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java
index 87d4466..05c9851 100644
--- a/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java
@@ -115,11 +115,11 @@ public class CreateAutoScaleVmProfileCmd extends BaseAsyncCreateCmd {
return otherDeployParams;
}
- public Long getAutoscaleUserId() {
+ public long getAutoscaleUserId() {
if (autoscaleUserId != null) {
return autoscaleUserId;
} else {
- return UserContext.current().getCaller().getId();
+ return UserContext.current().getCallerUserId();
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/026cca46/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
index 247441e..96f6ada 100644
--- a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
+++ b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
@@ -311,7 +311,7 @@ public class AutoScaleManagerImpl<Type> extends ManagerBase implements AutoScale
long zoneId = cmd.getZoneId();
long serviceOfferingId = cmd.getServiceOfferingId();
- Long autoscaleUserId = cmd.getAutoscaleUserId();
+ long autoscaleUserId = cmd.getAutoscaleUserId();
DataCenter zone = _configMgr.getZone(zoneId);
@@ -336,10 +336,6 @@ public class AutoScaleManagerImpl<Type> extends ManagerBase implements AutoScale
*/
ApiDispatcher.processParameters(new DeployVMCmd(), deployParams);
- if (autoscaleUserId == null) {
- autoscaleUserId = UserContext.current().getCallerUserId();
- }
-
AutoScaleVmProfileVO profileVO = new AutoScaleVmProfileVO(cmd.getZoneId(), cmd.getDomainId(), cmd.getAccountId(), cmd.getServiceOfferingId(), cmd.getTemplateId(), cmd.getOtherDeployParams(),
cmd.getCounterParamList(), cmd.getDestroyVmGraceperiod(), autoscaleUserId);
profileVO = checkValidityAndPersist(profileVO);