You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/05/21 21:34:02 UTC
[04/50] [abbrv] git commit: updated refs/heads/ui-vpc-redesign to
e35f144
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/ui-vpc-redesign
Commit: 63e92a4ea6766212d4450cde3cf205d661a6419d
Parents: 85d54cd
Author: Isaac Chiang <is...@gmail.com>
Authored: Mon May 20 08:54:13 2013 +0800
Committer: Isaac Chiang <is...@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);