cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject [2/3] git commit: updated refs/heads/affinity_groups to 2455843
Date Fri, 29 Mar 2013 07:42:55 GMT
Changes to AbstractDeployPlannerSelector were missing


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

Branch: refs/heads/affinity_groups
Commit: 4fee6776762b71f56a5d58ff49d6e52ed4efedc6
Parents: fff0750
Author: Prachi Damle <prachi@cloud.com>
Authored: Fri Mar 29 00:27:29 2013 -0700
Committer: Prachi Damle <prachi@cloud.com>
Committed: Fri Mar 29 00:27:29 2013 -0700

----------------------------------------------------------------------
 .../deploy/AbstractDeployPlannerSelector.java      |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4fee6776/server/src/com/cloud/deploy/AbstractDeployPlannerSelector.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/deploy/AbstractDeployPlannerSelector.java b/server/src/com/cloud/deploy/AbstractDeployPlannerSelector.java
index 62094eb..b52791d 100755
--- a/server/src/com/cloud/deploy/AbstractDeployPlannerSelector.java
+++ b/server/src/com/cloud/deploy/AbstractDeployPlannerSelector.java
@@ -18,15 +18,22 @@ package com.cloud.deploy;
 
 import java.util.Map;
 
+import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
+import com.cloud.configuration.Config;
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.vm.UserVmVO;
 
 public abstract class AbstractDeployPlannerSelector implements DeployPlannerSelector {
     protected Map<String, Object>  params;
     protected String name;
     protected int runLevel;
-    
+
+    @Inject
+    protected ConfigurationDao _configDao;
+    protected String _allocationAlgorithm = "random";
+
     @Override
     public String getName() {
         return name;
@@ -59,6 +66,7 @@ public abstract class AbstractDeployPlannerSelector implements DeployPlannerSele
 
     @Override
     public boolean configure(String name, Map<String, Object> params) throws ConfigurationException
{
+        _allocationAlgorithm = _configDao.getValue(Config.VmAllocationAlgorithm.key());
         return true;
     }
 


Mime
View raw message