cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject [1/7] CLOUDSTACK-1276, CLOUDSTACK-1729: Remove autoscanning, ensure adpater execution order in runtime
Date Wed, 27 Mar 2013 13:20:20 GMT
Updated Branches:
  refs/heads/4.1 8a358980b -> e221d18bc


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6aaa4f68/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index f03f5b8..3a57b2f 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -106,6 +106,7 @@ import org.apache.cloudstack.api.command.user.zone.*;
 import org.apache.cloudstack.api.response.ExtractResponse;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.GetVncPortAnswer;
@@ -233,8 +234,10 @@ import com.cloud.utils.EnumUtils;
 import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.Pair;
 import com.cloud.utils.PasswordGenerator;
+import com.cloud.utils.ReflectUtil;
 import com.cloud.utils.Ternary;
 import com.cloud.utils.component.Adapter;
+import com.cloud.utils.component.AdapterBase;
 import com.cloud.utils.component.ComponentContext;
 import com.cloud.utils.component.ComponentLifecycle;
 import com.cloud.utils.component.Manager;
@@ -370,9 +373,9 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
     @Inject
     private HypervisorCapabilitiesDao _hypervisorCapabilitiesDao;
 
-    @Inject
     private List<HostAllocator> _hostAllocators;
-    @Inject
+
+	@Inject
     private ConfigurationManager _configMgr;
     @Inject
     private ResourceTagDao _resourceTagDao;
@@ -391,13 +394,6 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
     @Inject
     S3Manager _s3Mgr;
 
-/*
-    @Inject
-    ComponentContext _forceContextRef;			// create a dependency to ComponentContext so that
it can be loaded beforehead
-
-    @Inject
-    EventUtils	_forceEventUtilsRef;
-*/
     private final ScheduledExecutorService _eventExecutor = Executors.newScheduledThreadPool(1,
new NamedThreadFactory("EventChecker"));
     private KeystoreManager _ksMgr;
 
@@ -405,7 +401,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
 
     private Map<String, Boolean> _availableIdsMap;
 
-    @Inject List<UserAuthenticator> _userAuthenticators;
+    List<UserAuthenticator> _userAuthenticators;
 
     @Inject ClusterManager _clusterMgr;
     private String _hashKey = null;
@@ -413,6 +409,22 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
     public ManagementServerImpl() {
     	setRunLevel(ComponentLifecycle.RUN_LEVEL_APPLICATION_MAINLOOP);
     }
+    
+    public List<UserAuthenticator> getUserAuthenticators() {
+    	return _userAuthenticators;
+    }
+    
+    public void setUserAuthenticators(List<UserAuthenticator> authenticators) {
+    	_userAuthenticators = authenticators;
+    }
+    
+    public List<HostAllocator> getHostAllocators() {
+		return _hostAllocators;
+	}
+
+	public void setHostAllocators(List<HostAllocator> _hostAllocators) {
+		this._hostAllocators = _hostAllocators;
+	}
 
 	@Override
 	public boolean configure(String name, Map<String, Object> params)
@@ -437,7 +449,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
 		return true;
 	}
 
-    @Override
+	@Override
     public boolean start() {
         s_logger.info("Startup CloudStack management server...");
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6aaa4f68/server/src/com/cloud/storage/StorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java
index 05e0cfe..624361f 100755
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -260,17 +260,28 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager,
C
     protected DownloadMonitor _downloadMonitor;
     @Inject
     protected ResourceTagDao _resourceTagDao;
-    @Inject
+
     protected List<StoragePoolAllocator> _storagePoolAllocators;
-    @Inject ConfigurationDao _configDao;
+    public List<StoragePoolAllocator> getStoragePoolAllocators() {
+		return _storagePoolAllocators;
+	}
+	public void setStoragePoolAllocators(
+			List<StoragePoolAllocator> _storagePoolAllocators) {
+		this._storagePoolAllocators = _storagePoolAllocators;
+	}
+
+	@Inject ConfigurationDao _configDao;
     @Inject ManagementServer _msServer;
 
-    // TODO : we don't have any instantiated pool discover, disable injection temporarily
-    // @Inject
     protected List<StoragePoolDiscoverer> _discoverers;
-
-
-    protected SearchBuilder<VMTemplateHostVO> HostTemplateStatesSearch;
+    public List<StoragePoolDiscoverer> getDiscoverers() {
+		return _discoverers;
+	}
+	public void setDiscoverers(List<StoragePoolDiscoverer> _discoverers) {
+		this._discoverers = _discoverers;
+	}
+
+	protected SearchBuilder<VMTemplateHostVO> HostTemplateStatesSearch;
     protected GenericSearchBuilder<StoragePoolHostVO, Long> UpHostsInPoolSearch;
     protected SearchBuilder<VMInstanceVO> StoragePoolSearch;
     protected SearchBuilder<StoragePoolVO> LocalStorageSearch;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6aaa4f68/server/src/com/cloud/user/AccountManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java
index ca4465d..f46db0e 100755
--- a/server/src/com/cloud/user/AccountManagerImpl.java
+++ b/server/src/com/cloud/user/AccountManagerImpl.java
@@ -222,7 +222,6 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager,
M
     @Inject
     private AutoScaleManager _autoscaleMgr;
 
-    @Inject
     private List<UserAuthenticator> _userAuthenticators;
 
     private final ScheduledExecutorService _executor = Executors.newScheduledThreadPool(1,
new NamedThreadFactory("AccountChecker"));
@@ -232,10 +231,26 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager,
M
     UserVO _systemUser;
     AccountVO _systemAccount;
 
-    @Inject
     List<SecurityChecker> _securityCheckers;
-    int _cleanupInterval;
+    
+	int _cleanupInterval;
 
+    public List<UserAuthenticator> getUserAuthenticators() {
+    	return _userAuthenticators;
+    }
+    
+    public void setUserAuthenticators(List<UserAuthenticator> authenticators) {
+    	_userAuthenticators = authenticators;
+    }
+    
+    public List<SecurityChecker> getSecurityCheckers() {
+		return _securityCheckers;
+	}
+
+	public void setSecurityCheckers(List<SecurityChecker> securityCheckers) {
+		this._securityCheckers = securityCheckers;
+	}
+    
     @Override
     public boolean configure(final String name, final Map<String, Object> params) throws
ConfigurationException {
         _systemAccount = _accountDao.findById(AccountVO.ACCOUNT_ID_SYSTEM);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6aaa4f68/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
index c22adfb..47ed622 100755
--- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -228,13 +228,23 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
     @Inject
     protected NetworkDao _networkDao;
 
-    @Inject
     protected List<DeploymentPlanner> _planners;
+    public List<DeploymentPlanner> getPlanners() {
+		return _planners;
+	}
+	public void setPlanners(List<DeploymentPlanner> _planners) {
+		this._planners = _planners;
+	}
 
-    @Inject
     protected List<HostAllocator> _hostAllocators;
-
-    @Inject
+    public List<HostAllocator> getHostAllocators() {
+		return _hostAllocators;
+	}
+	public void setHostAllocators(List<HostAllocator> _hostAllocators) {
+		this._hostAllocators = _hostAllocators;
+	}
+
+	@Inject
     protected ResourceManager _resourceMgr;
 
     @Inject


Mime
View raw message