106106import org .apache .cloudstack .api .response .ExtractResponse ;
107107import org .apache .commons .codec .binary .Base64 ;
108108import org .apache .log4j .Logger ;
109+ import org .springframework .stereotype .Component ;
109110
110111import com .cloud .agent .AgentManager ;
111112import com .cloud .agent .api .GetVncPortAnswer ;
233234import com .cloud .utils .NumbersUtil ;
234235import com .cloud .utils .Pair ;
235236import com .cloud .utils .PasswordGenerator ;
237+ import com .cloud .utils .ReflectUtil ;
236238import com .cloud .utils .Ternary ;
237239import com .cloud .utils .component .Adapter ;
240+ import com .cloud .utils .component .AdapterBase ;
238241import com .cloud .utils .component .ComponentContext ;
239242import com .cloud .utils .component .ComponentLifecycle ;
240243import com .cloud .utils .component .Manager ;
@@ -370,9 +373,9 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
370373 @ Inject
371374 private HypervisorCapabilitiesDao _hypervisorCapabilitiesDao ;
372375
373- @ Inject
374376 private List <HostAllocator > _hostAllocators ;
375- @ Inject
377+
378+ @ Inject
376379 private ConfigurationManager _configMgr ;
377380 @ Inject
378381 private ResourceTagDao _resourceTagDao ;
@@ -391,28 +394,37 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
391394 @ Inject
392395 S3Manager _s3Mgr ;
393396
394- /*
395- @Inject
396- ComponentContext _forceContextRef; // create a dependency to ComponentContext so that it can be loaded beforehead
397-
398- @Inject
399- EventUtils _forceEventUtilsRef;
400- */
401397 private final ScheduledExecutorService _eventExecutor = Executors .newScheduledThreadPool (1 , new NamedThreadFactory ("EventChecker" ));
402398 private KeystoreManager _ksMgr ;
403399
404400 private Map <String , String > _configs ;
405401
406402 private Map <String , Boolean > _availableIdsMap ;
407403
408- @ Inject List <UserAuthenticator > _userAuthenticators ;
404+ List <UserAuthenticator > _userAuthenticators ;
409405
410406 @ Inject ClusterManager _clusterMgr ;
411407 private String _hashKey = null ;
412408
413409 public ManagementServerImpl () {
414410 setRunLevel (ComponentLifecycle .RUN_LEVEL_APPLICATION_MAINLOOP );
415411 }
412+
413+ public List <UserAuthenticator > getUserAuthenticators () {
414+ return _userAuthenticators ;
415+ }
416+
417+ public void setUserAuthenticators (List <UserAuthenticator > authenticators ) {
418+ _userAuthenticators = authenticators ;
419+ }
420+
421+ public List <HostAllocator > getHostAllocators () {
422+ return _hostAllocators ;
423+ }
424+
425+ public void setHostAllocators (List <HostAllocator > _hostAllocators ) {
426+ this ._hostAllocators = _hostAllocators ;
427+ }
416428
417429 @ Override
418430 public boolean configure (String name , Map <String , Object > params )
@@ -437,7 +449,7 @@ public boolean configure(String name, Map<String, Object> params)
437449 return true ;
438450 }
439451
440- @ Override
452+ @ Override
441453 public boolean start () {
442454 s_logger .info ("Startup CloudStack management server..." );
443455
0 commit comments