cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/4.3-forward to df6f40f
Date Sun, 26 Jan 2014 14:25:48 GMT
Updated Branches:
  refs/heads/4.3-forward 390325c50 -> df6f40fe7


Revert "findbugs: remove compatible objects from collection"

This reverts commit 390325c50b4f401a0dd91fc3b6b0b03f21db0bbc.


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

Branch: refs/heads/4.3-forward
Commit: df6f40fe737b68bb11afb075c8fae32029e7199d
Parents: 390325c
Author: Daan Hoogland <daan@onecht.net>
Authored: Sun Jan 26 15:25:19 2014 +0100
Committer: Daan Hoogland <daan@onecht.net>
Committed: Sun Jan 26 15:25:19 2014 +0100

----------------------------------------------------------------------
 .../deploy/DeploymentPlanningManagerImpl.java   | 37 ++++++++++----------
 1 file changed, 19 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/df6f40fe/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
index 160e9cf..a41f5ee 100644
--- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
+++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
@@ -30,8 +30,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
-
 import org.apache.cloudstack.affinity.AffinityGroupProcessor;
 import org.apache.cloudstack.affinity.AffinityGroupService;
 import org.apache.cloudstack.affinity.AffinityGroupVMMapVO;
@@ -50,16 +48,8 @@ import org.apache.cloudstack.managed.context.ManagedContextTimerTask;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
 import org.apache.cloudstack.utils.identity.ManagementServerNode;
+import org.apache.log4j.Logger;
 
-import com.cloud.agent.AgentManager;
-import com.cloud.agent.Listener;
-import com.cloud.agent.api.AgentControlAnswer;
-import com.cloud.agent.api.AgentControlCommand;
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.Command;
-import com.cloud.agent.api.StartupCommand;
-import com.cloud.agent.api.StartupRoutingCommand;
-import com.cloud.agent.manager.allocator.HostAllocator;
 import com.cloud.capacity.CapacityManager;
 import com.cloud.capacity.dao.CapacityDao;
 import com.cloud.configuration.Config;
@@ -80,6 +70,7 @@ import com.cloud.deploy.dao.PlannerHostReservationDao;
 import com.cloud.exception.AffinityConflictException;
 import com.cloud.exception.ConnectionException;
 import com.cloud.exception.InsufficientServerCapacityException;
+import com.cloud.exception.PermissionDeniedException;
 import com.cloud.host.Host;
 import com.cloud.host.HostVO;
 import com.cloud.host.Status;
@@ -111,6 +102,7 @@ import com.cloud.utils.db.DB;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
 import com.cloud.utils.db.TransactionCallback;
+import com.cloud.utils.db.TransactionCallbackNoReturn;
 import com.cloud.utils.db.TransactionStatus;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.fsm.StateListener;
@@ -119,10 +111,19 @@ import com.cloud.vm.ReservationContext;
 import com.cloud.vm.VMInstanceVO;
 import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachine.Event;
-import com.cloud.vm.VirtualMachine.State;
 import com.cloud.vm.VirtualMachineProfile;
+import com.cloud.vm.VirtualMachine.State;
 import com.cloud.vm.dao.UserVmDao;
 import com.cloud.vm.dao.VMInstanceDao;
+import com.cloud.agent.AgentManager;
+import com.cloud.agent.Listener;
+import com.cloud.agent.api.AgentControlAnswer;
+import com.cloud.agent.api.AgentControlCommand;
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.Command;
+import com.cloud.agent.api.StartupCommand;
+import com.cloud.agent.api.StartupRoutingCommand;
+import com.cloud.agent.manager.allocator.HostAllocator;
 
 
 @Local(value = { DeploymentPlanningManager.class })
@@ -206,7 +207,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
         return _affinityProcessors;
     }
     public void setAffinityGroupProcessors(List<AffinityGroupProcessor> affinityProcessors)
{
-        _affinityProcessors = affinityProcessors;
+        this._affinityProcessors = affinityProcessors;
     }
 
     @Override
@@ -950,7 +951,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
         }
 
         // Cluster can be put in avoid set in following scenarios:
-        // 1. If storage allocators haven't put any pools in avoid set means either no pools
in cluster
+        // 1. If storage allocators haven't put any pools in avoid set means either no pools
in cluster 
         // or pools not suitable for the allocators to handle or there is no
         // linkage of any suitable host to any of the pools in cluster
         // 2. If all 'shared' or 'local' pools are in avoid set
@@ -1151,9 +1152,9 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
                 List<StoragePool> suitablePools = new ArrayList<StoragePool>();
                 StoragePool pool = null;
                 if (toBeCreated.getPoolId() != null) {
-                    pool = (StoragePool) dataStoreMgr.getPrimaryDataStore(toBeCreated.getPoolId());
+                    pool = (StoragePool) this.dataStoreMgr.getPrimaryDataStore(toBeCreated.getPoolId());
                 } else {
-                    pool = (StoragePool) dataStoreMgr.getPrimaryDataStore(plan.getPoolId());
+                    pool = (StoragePool) this.dataStoreMgr.getPrimaryDataStore(plan.getPoolId());
                 }
 
                 if (!pool.isInMaintenance()) {
@@ -1166,7 +1167,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
                                 && plan.getClusterId() == exstPoolClusterId) {
                             canReusePool = true;
                         } else if (plan.getDataCenterId() == exstPoolDcId) {
-                            DataStore dataStore = dataStoreMgr.getPrimaryDataStore(pool.getId());
+                            DataStore dataStore = this.dataStoreMgr.getPrimaryDataStore(pool.getId());
                             if (dataStore != null && dataStore.getScope() != null
                                     && dataStore.getScope().getScopeType() == ScopeType.ZONE)
{
                                 canReusePool = true;
@@ -1267,7 +1268,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
             }
         }
         if (suitableVolumeStoragePools.values() != null) {
-            poolsToAvoidOutput.removeAll(suitableVolumeStoragePools.keySet());
+            poolsToAvoidOutput.removeAll(suitableVolumeStoragePools.values());
         }
         if (avoid.getPoolsToAvoid() != null) {
             avoid.getPoolsToAvoid().addAll(poolsToAvoidOutput);


Mime
View raw message