cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From isaacchi...@apache.org
Subject git commit: updated refs/heads/master to 63e92a4
Date Mon, 20 May 2013 00:59:09 GMT
Updated Branches:
  refs/heads/master 85d54cd1c -> 63e92a4ea


CLOUDSTACK-1871 : domainId parameter to uploadVolume not working

1. Remove duplicated lines for setting domainId.
2. Set domainId with owner's domain if the owner is specified.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/63e92a4e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/63e92a4e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/63e92a4e

Branch: refs/heads/master
Commit: 63e92a4ea6766212d4450cde3cf205d661a6419d
Parents: 85d54cd
Author: Isaac Chiang <isaacchiang@gmail.com>
Authored: Mon May 20 08:54:13 2013 +0800
Committer: Isaac Chiang <isaacchiang@gmail.com>
Committed: Mon May 20 08:54:13 2013 +0800

----------------------------------------------------------------------
 .../src/com/cloud/storage/VolumeManagerImpl.java   |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/63e92a4e/server/src/com/cloud/storage/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java b/server/src/com/cloud/storage/VolumeManagerImpl.java
index 2f4b2c8..55e20cf 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -708,19 +708,19 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager
{
 
         VolumeVO volume = new VolumeVO(volumeName, zoneId, -1, -1, -1,
                 new Long(-1), null, null, 0, Volume.Type.DATADISK);
+        Account owner = (caller.getId() == ownerId) ? caller : _accountMgr
+                          .getActiveAccountById(ownerId);
         volume.setPoolId(null);
         volume.setDataCenterId(zoneId);
         volume.setPodId(null);
         volume.setAccountId(ownerId);
-        volume.setDomainId(((caller == null) ? Domain.ROOT_DOMAIN : caller
-                .getDomainId()));
         long diskOfferingId = _diskOfferingDao.findByUniqueName(
                 "Cloud.com-Custom").getId();
         volume.setDiskOfferingId(diskOfferingId);
         // volume.setSize(size);
         volume.setInstanceId(null);
         volume.setUpdated(new Date());
-        volume.setDomainId((caller == null) ? Domain.ROOT_DOMAIN : caller
+        volume.setDomainId((owner == null) ? Domain.ROOT_DOMAIN : owner
                 .getDomainId());
 
         volume = _volsDao.persist(volume);


Mime
View raw message