cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [1/3] git commit: updated refs/heads/4.1 to a17adda
Date Thu, 04 Apr 2013 23:00:55 GMT
Updated Branches:
  refs/heads/4.1 016742011 -> a17addafa
  refs/heads/master 42ffac3ae -> 1274d8f68


CLOUDSTACK-1917: Finalize componentContext.xml/nonComponentContext.xml content organization
to be plugin friendly


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

Branch: refs/heads/4.1
Commit: a17addafaaf5e342d270d7e4b53520c1fb658466
Parents: 0167420
Author: Kelven Yang <kelveny@gmail.com>
Authored: Thu Apr 4 14:16:13 2013 -0700
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Thu Apr 4 14:16:13 2013 -0700

----------------------------------------------------------------------
 client/tomcatconf/applicationContext.xml.in        |  155 +++++++++----
 client/tomcatconf/componentContext.xml.in          |  176 +++++++-------
 client/tomcatconf/nonossComponentContext.xml.in    |  184 +++++++--------
 .../src/com/cloud/utils/component/AdapterList.java |   34 +++
 4 files changed, 312 insertions(+), 237 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a17addaf/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in
index 17725f0..bd95bb4 100644
--- a/client/tomcatconf/applicationContext.xml.in
+++ b/client/tomcatconf/applicationContext.xml.in
@@ -32,6 +32,12 @@
 
   <context:annotation-config />
 
+<!--=====================================================================================================-->
+<!--                                                                                 
                   -->
+<!--                           core OSS/non-OSS Common components                    
                   -->  
+<!--                                                                                 
                   -->
+<!--=====================================================================================================-->
+
   <!--
     @DB support
   -->
@@ -568,7 +574,53 @@
 
   <!--
     Managers
-  --> 
+  -->
+  <bean id="accountManagerImpl" class="com.cloud.user.AccountManagerImpl" >
+    <property name="UserAuthenticators" value="#{userAuthenticators.Adapters}" />
+    <property name="SecurityCheckers" value="#{securityCheckers.Adapters}" />
+  </bean>
+  
+  <bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl">
+    <property name="UserAuthenticators" value="#{userAuthenticators.Adapters}" />
+    <property name="HostAllocators" value="#{hostAllocators.Adapters}" />
+  </bean>
+
+  <bean id="storageManagerImpl" class="com.cloud.storage.StorageManagerImpl">
+    <property name="StoragePoolAllocators" value="#{storagePoolAllocators.Adapters}" />
+  </bean>
+
+  <bean id="FirstFitPlanner" class="com.cloud.deploy.FirstFitPlanner">
+    <property name="name" value="First Fit"/>
+    <property name="StoragePoolAllocators" value="#{storagePoolAllocators.Adapters}" />
+    <property name="HostAllocators" value="#{hostAllocators.Adapters}" />
+  </bean>
+  
+  <bean id="resourceManagerImpl" class="com.cloud.resource.ResourceManagerImpl" >
+    <property name="PodAllocators" value="#{podAllocators.Adapters}" />
+    <property name="Discoverers" value="#{resourceDiscoverers.Adapters}" />
+  </bean>
+
+  <bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl"
>
+    <property name="Investigators" value="#{haInvestigators.Adapters}" />
+    <property name="FenceBuilders" value="#{haFenceBuilders.Adapters}" />
+  </bean>
+
+  <bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl"
>
+    <property name="HostAllocators" value="#{hostAllocators.Adapters}" />
+    <property name="Planners" value="#{deploymentPlanners.Adapters}" />
+  </bean>
+  
+  <bean id="networkManagerImpl" class="com.cloud.network.NetworkManagerImpl" >
+    <property name="NetworkGurus" value="#{networkGurus.Adapters}" />
+    <property name="NetworkElements" value="#{networkElements.Adapters}" />
+    <property name="IpDeployers" value="#{ipDeployers.Adapters}" />
+    <property name="DhcpProviders" value="#{dhcpProviders.Adapters}" />
+  </bean>
+
+  <bean id="networkModelImpl" class="com.cloud.network.NetworkModelImpl">
+    <property name="NetworkElements" value="#{networkElements.Adapters}" />
+  </bean>
+   
   <bean id="configurationServerImpl" class="com.cloud.server.ConfigurationServerImpl"
/>
    
   <bean id="clusterManagerImpl" class="com.cloud.cluster.ClusterManagerImpl" />
@@ -631,49 +683,6 @@
   <bean id="vpcVirtualNetworkApplianceManagerImpl" class="com.cloud.network.router.VpcVirtualNetworkApplianceManagerImpl"
/>
 
   <!--
-    Baremetal components
-  -->
-<!--
-  <bean id="BareMetalDhcp" class="com.cloud.baremetal.networkservice.BaremetalDhcpElement">
-    <property name="name" value="BareMetalDhcp"/>
-  </bean>
-  <bean id="BareMetalPxe" class="com.cloud.baremetal.networkservice.BaremetalPxeElement">
-    <property name="name" value="BareMetalPxe"/>
-  </bean>
-  <bean id="BareMetalUserdata" class="com.cloud.baremetal.networkservice.BaremetalUserdataElement">
-      <property name="name" value="BareMetalUserdata"/>
-  </bean>
-
-  <bean id="BareMetalTemplateAdapter" class="com.cloud.baremetal.manager.BareMetalTemplateAdapter"
/>
-
-  <bean id="BareMetalDiscoverer" class="com.cloud.baremetal.manager.BareMetalDiscoverer">
-    <property name="name" value="Bare Metal Agent"/>
-  </bean>
-
-  <bean id="BareMetalPlanner" class="com.cloud.baremetal.manager.BareMetalPlanner">
-    <property name="name" value="BareMetal Fit"/>
-  </bean>
-  
-  <bean id="BaremetalGuru" class="com.cloud.baremetal.manager.BareMetalGuru">
-    <property name="name" value="BaremetalGuru"/>
-  </bean>
-
-  <bean id="BaremetalPlannerSelector" class="com.cloud.baremetal.manager.BaremetalPlannerSelector">
-    <property name="name" value="BaremetalPlannerSelector"/>
-  </bean>
-
-  <bean id="BaremetalManager" class="com.cloud.baremetal.manager.BaremetalManagerImpl"/>
-  <bean id="BaremetalDhcpManager" class="com.cloud.baremetal.networkservice.BaremetalDhcpManagerImpl"/>
-  <bean id="BaremetalKickStartPxeService" class="com.cloud.baremetal.networkservice.BaremetalKickStartServiceImpl"/>
-  <bean id="BaremetalPingPxeService" class="com.cloud.baremetal.networkservice.BareMetalPingServiceImpl"
/>
-  <bean id="BaremetalPxeManager" class="com.cloud.baremetal.networkservice.BaremetalPxeManagerImpl"
/> 
-    
-  <bean id="bAREMETAL" class="org.apache.cloudstack.storage.image.format.BAREMETAL" />
-  <bean id="baremetalDhcpDaoImpl" class="com.cloud.baremetal.database.BaremetalDhcpDaoImpl"
/>
-  <bean id="baremetalPxeDaoImpl" class="com.cloud.baremetal.database.BaremetalPxeDaoImpl"
/>
--->
-
-  <!--
     Misc components
   -->
   <bean id="cloudZonesStartupProcessor" class="com.cloud.hypervisor.CloudZonesStartupProcessor"
/>
@@ -704,7 +713,7 @@
   <bean id="hypervisorBasedSnapshot" class="org.apache.cloudstack.storage.snapshot.strategy.HypervisorBasedSnapshot"
/>
   <bean id="hypervsiorHostEndPointRpcServer" class="org.apache.cloudstack.storage.HypervsiorHostEndPointRpcServer"
/>
   <bean id="iSCSI" class="org.apache.cloudstack.storage.datastore.type.ISCSI" />
-  <bean id="iSO" class="org.apache.cloudstack.storage.image.format.ISO" />
+  <bean id="ISO" class="org.apache.cloudstack.storage.image.format.ISO" />
   <bean id="imageDataFactoryImpl" class="org.apache.cloudstack.storage.image.ImageDataFactoryImpl"
/>
   <bean id="imageDataManagerImpl" class="org.apache.cloudstack.storage.image.manager.ImageDataManagerImpl"
/>
   <bean id="imageDataStoreHelper" class="org.apache.cloudstack.storage.image.datastore.ImageDataStoreHelper"
/>
@@ -715,12 +724,12 @@
   <bean id="iso" class="org.apache.cloudstack.engine.subsystem.api.storage.type.Iso" />
   <bean id="networkFileSystem" class="org.apache.cloudstack.storage.datastore.type.NetworkFileSystem"
/>
   <bean id="networkRestService" class="org.apache.cloudstack.engine.rest.service.api.NetworkRestService"
/>
-  <bean id="oVA" class="org.apache.cloudstack.storage.image.format.OVA" />
+  <bean id="OVA" class="org.apache.cloudstack.storage.image.format.OVA" />
   <bean id="objectInDataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.ObjectInDataStoreManagerImpl"
/>
   <bean id="podRestService" class="org.apache.cloudstack.engine.rest.service.api.PodRestService"
/>
   <bean id="primaryDataStoreHelper" class="org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper"
/>
   <bean id="provisioningServiceImpl" class="org.apache.cloudstack.engine.service.api.ProvisioningServiceImpl"
/>
-  <bean id="qCOW2" class="org.apache.cloudstack.storage.image.format.QCOW2" />
+  <bean id="QCOW2" class="org.apache.cloudstack.storage.image.format.QCOW2" />
   <bean id="registerCompleteServlet" class="com.cloud.servlet.RegisterCompleteServlet"
/>
   <bean id="rootDisk" class="org.apache.cloudstack.engine.subsystem.api.storage.type.RootDisk"
/>
   <bean id="snapshotDataFactoryImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotDataFactoryImpl"
/>
@@ -730,7 +739,7 @@
   <bean id="unknown" class="org.apache.cloudstack.storage.image.format.Unknown" />
   <bean id="usageEventUtils" class="com.cloud.event.UsageEventUtils" />
   <bean id="userContextInitializer" class="com.cloud.user.UserContextInitializer" />
-  <bean id="vHD" class="org.apache.cloudstack.storage.image.format.VHD" />
+  <bean id="VHD" class="org.apache.cloudstack.storage.image.format.VHD" />
   <bean id="vMEntityManagerImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl"
/>
   <bean id="virtualMachineEntityImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl"
/>
   <bean id="virtualMachineRestService" class="org.apache.cloudstack.engine.rest.service.api.VirtualMachineRestService"
/>
@@ -740,5 +749,55 @@
   <bean id="volumeServiceImpl" class="org.apache.cloudstack.storage.volume.VolumeServiceImpl"
/>
   <bean id="volumeTypeHelper" class="org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeTypeHelper"
/>
   <bean id="zoneRestService" class="org.apache.cloudstack.engine.rest.service.api.ZoneRestService"
/>
+
+<!--=======================================================================================================-->
+<!--                                                                                 
                     -->
+<!--                           Module-basis OSS/non-OSS Common components            
                     -->
+<!--                                                                                 
                     -->
+<!--=======================================================================================================-->
+
+  <!--
+    Baremetal components
+  -->
+  
+<!--
+  <bean id="BareMetalDhcp" class="com.cloud.baremetal.networkservice.BaremetalDhcpElement">
+    <property name="name" value="BareMetalDhcp"/>
+  </bean>
+  <bean id="BareMetalPxe" class="com.cloud.baremetal.networkservice.BaremetalPxeElement">
+    <property name="name" value="BareMetalPxe"/>
+  </bean>
+  <bean id="BareMetalUserdata" class="com.cloud.baremetal.networkservice.BaremetalUserdataElement">
+      <property name="name" value="BareMetalUserdata"/>
+  </bean>
+
+  <bean id="BareMetalTemplateAdapter" class="com.cloud.baremetal.manager.BareMetalTemplateAdapter"
/>
+
+  <bean id="BareMetalDiscoverer" class="com.cloud.baremetal.manager.BareMetalDiscoverer">
+    <property name="name" value="Bare Metal Agent"/>
+  </bean>
+
+  <bean id="BareMetalPlanner" class="com.cloud.baremetal.manager.BareMetalPlanner">
+    <property name="name" value="BareMetal Fit"/>
+  </bean>
+  
+  <bean id="BaremetalGuru" class="com.cloud.baremetal.manager.BareMetalGuru">
+    <property name="name" value="BaremetalGuru"/>
+  </bean>
+
+  <bean id="BaremetalPlannerSelector" class="com.cloud.baremetal.manager.BaremetalPlannerSelector">
+    <property name="name" value="BaremetalPlannerSelector"/>
+  </bean>
+
+  <bean id="BaremetalManager" class="com.cloud.baremetal.manager.BaremetalManagerImpl"/>
+  <bean id="BaremetalDhcpManager" class="com.cloud.baremetal.networkservice.BaremetalDhcpManagerImpl"/>
+  <bean id="BaremetalKickStartPxeService" class="com.cloud.baremetal.networkservice.BaremetalKickStartServiceImpl"/>
+  <bean id="BaremetalPingPxeService" class="com.cloud.baremetal.networkservice.BareMetalPingServiceImpl"
/>
+  <bean id="BaremetalPxeManager" class="com.cloud.baremetal.networkservice.BaremetalPxeManagerImpl"
/> 
+    
+  <bean id="BAREMETAL" class="org.apache.cloudstack.storage.image.format.BAREMETAL" />
+  <bean id="baremetalDhcpDaoImpl" class="com.cloud.baremetal.database.BaremetalDhcpDaoImpl"
/>
+  <bean id="baremetalPxeDaoImpl" class="com.cloud.baremetal.database.BaremetalPxeDaoImpl"
/>
+-->
   
 </beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a17addaf/client/tomcatconf/componentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/componentContext.xml.in b/client/tomcatconf/componentContext.xml.in
index 2a4a29f..48a6d75 100644
--- a/client/tomcatconf/componentContext.xml.in
+++ b/client/tomcatconf/componentContext.xml.in
@@ -30,74 +30,49 @@
                       http://www.springframework.org/schema/context
                       http://www.springframework.org/schema/context/spring-context-3.0.xsd">
                    
 
-  <!--
-    OSS deployment component configuration
-  -->
+<!--
+ 
+  OSS deployment configuration
+      
+  OSS/non-OSS counter-exclusive components and related configurations should be put here
+  for example, configurationDaoImpl component, it has exclusive configuration settings in
OSS and non-OSS deployment,
+  its component declaration should be put in both componentContext.xml.in and nonossComponentContext.xml.in,
each with
+  independent configuration
+    
+-->
+  
   <bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
   <bean id="configurationDaoImpl" class="com.cloud.configuration.dao.ConfigurationDaoImpl"
/>
   
-  <!-- 
-    Managers & pluggable adapters configuration under OSS deployment
-  -->
-  <bean id="accountManagerImpl" class="com.cloud.user.AccountManagerImpl" >
-    <property name="UserAuthenticators">
-      <list>
-          <ref bean="MD5UserAuthenticator"/>
-          <ref bean="LDAPUserAuthenticator"/>
-      </list>
-    </property>
-    <property name="SecurityCheckers">
-      <list>
-          <ref bean="domainChecker"/>
-      </list>
-    </property>
-  </bean>
-  
-  <bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl">
-    <property name="UserAuthenticators">
+<!--
+
+  Deployment configurations of various adapters
+    
+  It determines whether or not a adapter is activated or how it is loaded in order in its
managing provider,
+     
+--> 
+
+  <!-- Security adapters -->
+  <bean id="userAuthenticators" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="MD5UserAuthenticator"/>
           <ref bean="LDAPUserAuthenticator"/>
       </list>
     </property>
-    <property name="HostAllocators">
-      <list>
-          <ref bean="FirstFitRouting"/>
-      </list>
-    </property>
   </bean>
 
-  <bean id="storageManagerImpl" class="com.cloud.storage.StorageManagerImpl">
-    <property name="StoragePoolAllocators">
+  <bean id="securityCheckers" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
-          <ref bean="LocalStoragePoolAllocator"/>
-          <ref bean="FirstFitStoragePoolAllocator"/>
+          <ref bean="domainChecker"/>
       </list>
     </property>
   </bean>
 
-  <bean id="FirstFitPlanner" class="com.cloud.deploy.FirstFitPlanner">
-    <property name="name" value="First Fit"/>
-    <property name="StoragePoolAllocators">
-      <list>
-          <ref bean="LocalStoragePoolAllocator"/>
-          <ref bean="FirstFitStoragePoolAllocator"/>
-      </list>
-    </property>
-    <property name="HostAllocators">
-      <list>
-          <ref bean="FirstFitRouting"/>
-      </list>
-    </property>
-  </bean>
-  
-  <bean id="resourceManagerImpl" class="com.cloud.resource.ResourceManagerImpl" >
-    <property name="PodAllocators">
-      <list>
-          <ref bean="UserConcentratedAllocator"/>
-      </list>
-    </property>
-    <property name="Discoverers">
+  <!-- Resource discoverers -->
+  <bean id="resourceDiscoverers" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="XcpServerDiscoverer"/>
           <ref bean="SecondaryStorageDiscoverer"/>
@@ -108,12 +83,13 @@
   -->
           
           <ref bean="OvmDiscoverer"/>
-       </list>
+      </list>
     </property>
   </bean>
 
-  <bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl"
>
-    <property name="Investigators">
+  <!-- HA adapters -->
+  <bean id="haInvestigators" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="CheckOnAgentInvestigator"/>
           <ref bean="XenServerInvestigator"/>
@@ -121,7 +97,10 @@
           <ref bean="ManagementIPSystemVMInvestigator"/>
       </list>
     </property>
-    <property name="FenceBuilders">
+  </bean>
+
+  <bean id="haFenceBuilders" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="XenServerFencer"/>
           <ref bean="KVMFencer"/>
@@ -130,13 +109,9 @@
     </property>
   </bean>
 
-  <bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl"
>
-    <property name="HostAllocators">
-      <list>
-          <ref bean="FirstFitRouting"/>
-      </list>
-    </property>
-    <property name="Planners">
+  <!-- Deployment/allocation adapters -->
+  <bean id="deploymentPlanners" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="FirstFitPlanner" />
           <ref bean="UserDispersingPlanner" />
@@ -145,46 +120,48 @@
 <!--
           <ref bean="BareMetalPlanner" />
 -->
-    
+      </list>
+    </property>
+  </bean>
+
+  <bean id="podAllocators" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
+      <list>
+          <ref bean="UserConcentratedAllocator"/>
       </list>
     </property>
   </bean>
   
-  <bean id="networkManagerImpl" class="com.cloud.network.NetworkManagerImpl" >
-    <property name="NetworkGurus">
+  <bean id="hostAllocators" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
-          <ref bean="StorageNetworkGuru"/>
-          <ref bean="ExternalGuestNetworkGuru"/>
-          <ref bean="PublicNetworkGuru"/>
-          <ref bean="PodBasedNetworkGuru"/>
-          <ref bean="DirectPodBasedNetworkGuru"/>
-          <ref bean="ControlNetworkGuru"/>
-          <ref bean="DirectNetworkGuru"/>
-          <ref bean="OvsGuestNetworkGuru"/>
-          <ref bean="PrivateNetworkGuru"/>
+          <ref bean="FirstFitRouting"/>
       </list>
     </property>
-    <property name="NetworkElements">
+  </bean>
+
+  <bean id="storagePoolAllocators" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
-          <ref bean="VirtualRouter"/>
-          <ref bean="Ovs"/>
-          <ref bean="SecurityGroupProvider"/>
-          <ref bean="VpcVirtualRouter"/>
-<!--          
-          <ref bean="BareMetalDhcp"/>
-          <ref bean="BareMetalPxe"/>
-          <ref bean="BareMetalUserdata"/>
--->
+          <ref bean="LocalStoragePoolAllocator"/>
+          <ref bean="FirstFitStoragePoolAllocator"/>
       </list>
     </property>
-    <property name="IpDeployers">
+  </bean>
+
+  <!-- Networking adapters -->
+  <bean id="ipDeployers" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="elasticLoadBalancerElement"/>
           <ref bean="VirtualRouter"/>
           <ref bean="VpcVirtualRouter"/>
       </list>
     </property>
-    <property name="DhcpProviders">
+  </bean>
+
+  <bean id="dhcpProviders" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="VirtualRouter"/>
           <ref bean="VpcVirtualRouter"/>
@@ -195,8 +172,24 @@
     </property>
   </bean>
 
-  <bean id="networkModelImpl" class="com.cloud.network.NetworkModelImpl">
-    <property name="NetworkElements">
+  <bean id="networkGurus" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
+      <list>
+          <ref bean="StorageNetworkGuru"/>
+          <ref bean="ExternalGuestNetworkGuru"/>
+          <ref bean="PublicNetworkGuru"/>
+          <ref bean="PodBasedNetworkGuru"/>
+          <ref bean="DirectPodBasedNetworkGuru"/>
+          <ref bean="ControlNetworkGuru"/>
+          <ref bean="DirectNetworkGuru"/>
+          <ref bean="OvsGuestNetworkGuru"/>
+          <ref bean="PrivateNetworkGuru"/>
+      </list>
+    </property>
+  </bean>
+  
+  <bean id="networkElements" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="VirtualRouter"/>
           <ref bean="Ovs"/>
@@ -206,8 +199,9 @@
           <ref bean="BareMetalDhcp"/>
           <ref bean="BareMetalPxe"/>
           <ref bean="BareMetalUserdata"/>
--->    
+-->
       </list>
     </property>
   </bean>
+  
 </beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a17addaf/client/tomcatconf/nonossComponentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/nonossComponentContext.xml.in b/client/tomcatconf/nonossComponentContext.xml.in
index 13004c3..c81f100 100644
--- a/client/tomcatconf/nonossComponentContext.xml.in
+++ b/client/tomcatconf/nonossComponentContext.xml.in
@@ -32,9 +32,16 @@
                       http://www.springframework.org/schema/context/spring-context-3.0.xsd">
                    
 
 
-  <!--
-     Non-OSS deployment component configuration
-  -->
+<!--
+ 
+  non-OSS deployment configuration
+      
+  OSS/non-OSS counter-exclusive components and related configurations should be put here
+  for example, configurationDaoImpl component, it has exclusive configuration settings in
OSS and non-OSS deployment,
+  its component declaration should be put in both componentContext.xml.in and nonossComponentContext.xml.in,
each with
+  independent configuration
+    
+-->
   <bean id="premiumDatabaseUpgradeChecker" class="com.cloud.upgrade.PremiumDatabaseUpgradeChecker"/>
   
   <!--
@@ -125,69 +132,35 @@
     <property name="name" value="BigSwitchVnsElement"/>
   </bean>
 
-  <!-- 
-    Managers & pluggable adapters configuration under non-OSS deployment
-  -->
-  <bean id="accountManagerImpl" class="com.cloud.user.AccountManagerImpl" >
-    <property name="UserAuthenticators">
-      <list>
-          <ref bean="MD5UserAuthenticator"/>
-          <ref bean="LDAPUserAuthenticator"/>
-      </list>
-    </property>
-    <property name="SecurityCheckers">
-      <list>
-          <ref bean="domainChecker"/>
-      </list>
-    </property>
-  </bean>
-  
-  <bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl">
-    <property name="UserAuthenticators">
+<!--
+
+  Deployment configurations of various adapters
+    
+  It determines whether or not a adapter is activated or how it is loaded in order in its
managing provider,
+     
+--> 
+
+  <!-- Security adapters -->
+  <bean id="userAuthenticators" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="MD5UserAuthenticator"/>
           <ref bean="LDAPUserAuthenticator"/>
       </list>
     </property>
-    <property name="HostAllocators">
-      <list>
-          <ref bean="FirstFitRouting"/>
-      </list>
-    </property>
   </bean>
 
-  <bean id="storageManagerImpl" class="com.cloud.storage.StorageManagerImpl">
-    <property name="StoragePoolAllocators">
+  <bean id="securityCheckers" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
-          <ref bean="LocalStoragePoolAllocator"/>
-          <ref bean="FirstFitStoragePoolAllocator"/>
+          <ref bean="domainChecker"/>
       </list>
     </property>
   </bean>
 
-  <bean id="FirstFitPlanner" class="com.cloud.deploy.FirstFitPlanner">
-    <property name="name" value="First Fit"/>
-
-    <property name="StoragePoolAllocators">
-      <list>
-          <ref bean="LocalStoragePoolAllocator"/>
-          <ref bean="FirstFitStoragePoolAllocator"/>
-      </list>
-    </property>
-    <property name="HostAllocators">
-      <list>
-          <ref bean="FirstFitRouting"/>
-      </list>
-    </property>
-  </bean>
-  
-  <bean id="resourceManagerImpl" class="com.cloud.resource.ResourceManagerImpl" >
-    <property name="PodAllocators">
-      <list>
-          <ref bean="UserConcentratedAllocator"/>
-      </list>
-    </property>
-    <property name="Discoverers">
+  <!-- Resource discoverers -->
+  <bean id="resourceDiscoverers" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="XcpServerDiscoverer"/>
           <ref bean="SecondaryStorageDiscoverer"/>
@@ -197,12 +170,13 @@
 -->
           <ref bean="OvmDiscoverer"/>
           <ref bean="vmwareServerDiscoverer"/>
-       </list>
+      </list>
     </property>
   </bean>
 
-  <bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl"
>
-    <property name="Investigators">
+  <!-- HA adapters -->
+  <bean id="haInvestigators" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="CheckOnAgentInvestigator"/>
           <ref bean="XenServerInvestigator"/>
@@ -211,7 +185,10 @@
           <ref bean="ManagementIPSystemVMInvestigator"/>
       </list>
     </property>
-    <property name="FenceBuilders">
+  </bean>
+
+  <bean id="haFenceBuilders" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="XenServerFencer"/>
           <ref bean="KVMFencer"/>
@@ -221,76 +198,87 @@
     </property>
   </bean>
 
-  <bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl"
>
-    <property name="HostAllocators">
-      <list>
-          <ref bean="FirstFitRouting"/>
-      </list>
-    </property>
-    <property name="Planners">
+  <!-- Deployment/allocation adapters -->
+  <bean id="deploymentPlanners" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="FirstFitPlanner" />
           <ref bean="UserDispersingPlanner" />
           <ref bean="UserConcentratedPodPlanner" />
+          
 <!--
           <ref bean="BareMetalPlanner" />
 -->
       </list>
     </property>
   </bean>
+
+  <bean id="podAllocators" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
+      <list>
+          <ref bean="UserConcentratedAllocator"/>
+      </list>
+    </property>
+  </bean>
   
-  <bean id="networkManagerImpl" class="com.cloud.network.NetworkManagerImpl" >
-    <property name="NetworkGurus">
+  <bean id="hostAllocators" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
-          <ref bean="StorageNetworkGuru"/>
-          <ref bean="ExternalGuestNetworkGuru"/>
-          <ref bean="PublicNetworkGuru"/>
-          <ref bean="PodBasedNetworkGuru"/>
-          <ref bean="DirectPodBasedNetworkGuru"/>
-          <ref bean="ControlNetworkGuru"/>
-          <ref bean="DirectNetworkGuru"/>
-          <ref bean="OvsGuestNetworkGuru"/>
-          <ref bean="PrivateNetworkGuru"/>
+          <ref bean="FirstFitRouting"/>
       </list>
     </property>
-    <property name="NetworkElements">
+  </bean>
+
+  <bean id="storagePoolAllocators" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
-          <ref bean="JuniperSRX"/>
-          <ref bean="Netscaler"/>
-          <ref bean="F5BigIP"/>
-          <ref bean="CiscoNexus1000vVSM"/>
-          <ref bean="bigSwitchVnsElement"/>
-          <ref bean="VirtualRouter"/>
-          <ref bean="Ovs"/>
-          <ref bean="SecurityGroupProvider"/>
-          <ref bean="VpcVirtualRouter"/>
-<!--
-          <ref bean="BareMetalDhcp"/>
-          <ref bean="BareMetalPxe"/>
-          <ref bean="BareMetalUserdata"/>
--->    
+          <ref bean="LocalStoragePoolAllocator"/>
+          <ref bean="FirstFitStoragePoolAllocator"/>
       </list>
     </property>
-    <property name="IpDeployers">
+  </bean>
+
+  <!-- Networking adapters -->
+  <bean id="ipDeployers" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="elasticLoadBalancerElement"/>
           <ref bean="VirtualRouter"/>
           <ref bean="VpcVirtualRouter"/>
       </list>
     </property>
-    <property name="DhcpProviders">
+  </bean>
+
+  <bean id="dhcpProviders" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="VirtualRouter"/>
           <ref bean="VpcVirtualRouter"/>
-<!--
+<!--          
           <ref bean="BareMetalDhcp"/>
--->
+-->    
       </list>
     </property>
   </bean>
 
-  <bean id="networkModelImpl" class="com.cloud.network.NetworkModelImpl">
-    <property name="NetworkElements">
+  <bean id="networkGurus" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
+      <list>
+          <ref bean="StorageNetworkGuru"/>
+          <ref bean="ExternalGuestNetworkGuru"/>
+          <ref bean="PublicNetworkGuru"/>
+          <ref bean="PodBasedNetworkGuru"/>
+          <ref bean="DirectPodBasedNetworkGuru"/>
+          <ref bean="ControlNetworkGuru"/>
+          <ref bean="DirectNetworkGuru"/>
+          <ref bean="OvsGuestNetworkGuru"/>
+          <ref bean="PrivateNetworkGuru"/>
+      </list>
+    </property>
+  </bean>
+  
+  <bean id="networkElements" class="com.cloud.utils.component.AdapterList">
+    <property name="Adapters">
       <list>
           <ref bean="JuniperSRX"/>
           <ref bean="Netscaler"/>
@@ -309,5 +297,5 @@
       </list>
     </property>
   </bean>
-
+  
 </beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a17addaf/utils/src/com/cloud/utils/component/AdapterList.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/component/AdapterList.java b/utils/src/com/cloud/utils/component/AdapterList.java
new file mode 100644
index 0000000..ae86717
--- /dev/null
+++ b/utils/src/com/cloud/utils/component/AdapterList.java
@@ -0,0 +1,34 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// the License.  You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package com.cloud.utils.component;
+
+import java.util.List;
+
+public class AdapterList<T extends Adapter> {
+	protected List<T> adapters;
+
+	public AdapterList() {
+	}
+	
+	public List<T> getAdapters() {
+		return adapters;
+	}
+
+	public void setAdapters(List<T> adapters) {
+		this.adapters = adapters;
+	}
+}


Mime
View raw message