cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [09/50] [abbrv] git commit: updated refs/heads/vmsync to aaa16af
Date Mon, 10 Jun 2013 00:53:58 GMT
CLOUDSTACK-2867 Cannot add multiple vmware zones in vCenter

Checking guid in database, if association of DC to zone exists already.


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

Branch: refs/heads/vmsync
Commit: 3ec7f8b99ebe9c02a6b6ed69efdb72dfb9543b3b
Parents: 1696e8c
Author: Sateesh Chodapuneedi <sateesh@apache.org>
Authored: Thu Jun 6 14:33:05 2013 +0530
Committer: Sateesh Chodapuneedi <sateesh@apache.org>
Committed: Thu Jun 6 14:33:05 2013 +0530

----------------------------------------------------------------------
 .../com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3ec7f8b9/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
index 78b7582..664651e 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
@@ -947,8 +947,8 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager,
Vmw
         // Check if DC is already part of zone
         // In that case vmware_data_center table should have the DC
         String vCenterHost = uri.getHost();
-        List<VmwareDatacenterVO> vmwareDcs = _vmwareDcDao.getVmwareDatacenterByNameAndVcenter(vmwareDcName,
vCenterHost);
-        if (vmwareDcs != null && vmwareDcs.size() != 0) {
+        vmwareDc = _vmwareDcDao.getVmwareDatacenterByGuid(vmwareDcName + "@" + vCenterHost);
+        if (vmwareDc != null) {
             throw new ResourceInUseException("This DC is already part of other CloudStack
zone(s). Cannot add this DC to more zones.");
         }
 


Mime
View raw message