cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject git commit: updated refs/heads/master to 54481d0
Date Wed, 05 Jun 2013 17:30:47 GMT
Updated Branches:
  refs/heads/master 1ddcd3e69 -> 54481d0b7


listLoadBalancingRules: when list by networkId, no need to pass the dataCenterId to the call


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

Branch: refs/heads/master
Commit: 54481d0b7bb03501c4cb9721a14d3079fa837476
Parents: 1ddcd3e
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Wed Jun 5 10:22:56 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Wed Jun 5 10:25:25 2013 -0700

----------------------------------------------------------------------
 engine/schema/src/com/cloud/vm/dao/UserVmDao.java  |    3 +--
 .../schema/src/com/cloud/vm/dao/UserVmDaoImpl.java |    3 +--
 .../network/lb/LoadBalancingRulesManagerImpl.java  |    5 ++---
 3 files changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/54481d0b/engine/schema/src/com/cloud/vm/dao/UserVmDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/UserVmDao.java b/engine/schema/src/com/cloud/vm/dao/UserVmDao.java
index e7cd61b..b4f9991 100755
--- a/engine/schema/src/com/cloud/vm/dao/UserVmDao.java
+++ b/engine/schema/src/com/cloud/vm/dao/UserVmDao.java
@@ -54,10 +54,9 @@ public interface UserVmDao extends GenericDao<UserVmVO, Long> {
 	/**
 	 * List user vm instances with virtualized networking (i.e. not direct attached networking)
for the given account and datacenter
 	 * @param accountId will search for vm instances belonging to this account
-	 * @param dcId will search for vm instances in this zone
 	 * @return the list of vm instances owned by the account in the given data center that have
virtualized networking (not direct attached networking)
 	 */
-	List<UserVmVO> listVirtualNetworkInstancesByAcctAndZone(long accountId, long dcId,
long networkId);
+	List<UserVmVO> listVirtualNetworkInstancesByAcctAndNetwork(long accountId, long networkId);
 	
 	List<UserVmVO> listByNetworkIdAndStates(long networkId, State... states);
 	

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/54481d0b/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java
index 5e8be10..1c11563 100755
--- a/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java
@@ -283,11 +283,10 @@ public class UserVmDaoImpl extends GenericDaoBase<UserVmVO, Long>
implements Use
     }
 
     @Override
-    public List<UserVmVO> listVirtualNetworkInstancesByAcctAndZone(long accountId,
long dcId, long networkId) {
+    public List<UserVmVO> listVirtualNetworkInstancesByAcctAndNetwork(long accountId,
long networkId) {
 
         SearchCriteria<UserVmVO> sc = AccountDataCenterVirtualSearch.create();
         sc.setParameters("account", accountId);
-        sc.setParameters("dc", dcId);
         sc.setJoinParameters("nicSearch", "networkId", networkId);
 
         return listBy(sc);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/54481d0b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
index d52859b..67d31ab 100755
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -1835,9 +1835,8 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase
implements
             }
         }
 
-        IPAddressVO addr = _ipAddressDao.findById(loadBalancer.getSourceIpAddressId());
-        List<UserVmVO> userVms = _vmDao.listVirtualNetworkInstancesByAcctAndZone(loadBalancer.getAccountId(),
-                addr.getDataCenterId(), loadBalancer.getNetworkId());
+        List<UserVmVO> userVms = _vmDao.listVirtualNetworkInstancesByAcctAndNetwork(loadBalancer.getAccountId(),
+                loadBalancer.getNetworkId());
 
         for (UserVmVO userVm : userVms) {
             // if the VM is destroyed, being expunged, in an error state, or in


Mime
View raw message