cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [5/8] git commit: updated refs/heads/master to 1e0f833
Date Sat, 29 Jun 2013 11:07:04 GMT
Group storage subsystem components for spring

Breaking down storage components among oss, nonoss and simulator
contexts. The default components are loaded by

OSS - applicationContext + componentContext
NonOSS - applicationContext + nonossComponentContext
Simulator - applicationContext + simulatorComponentContext

provider beans are are selectively overridden for simpler configuration.
Where possible beans are loaded by local reference.

<list merge=true> does not unfortunately work perfectly for bean merging
the providers causing a bit of bloat. Explore for later.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>


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

Branch: refs/heads/master
Commit: f1134da8df122aeb95cb59f3aa47438709efd30f
Parents: fd867d5
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Wed Jun 26 18:59:59 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Sat Jun 29 13:53:41 2013 +0530

----------------------------------------------------------------------
 client/pom.xml                                  |   7 +-
 client/tomcatconf/applicationContext.xml.in     | 179 ++++++++++++-------
 client/tomcatconf/componentContext.xml.in       |  27 ++-
 client/tomcatconf/nonossComponentContext.xml.in |  31 +++-
 .../tomcatconf/simulatorComponentContext.xml.in |  49 +++--
 developer/pom.xml                               |   6 +
 .../storage/motion/DataMotionServiceImpl.java   |  18 +-
 .../test/resource/storageContext.xml            |   3 +-
 .../storage/datastore/DataStoreManagerImpl.java |  29 +--
 .../provider/DataStoreProviderManagerImpl.java  |  36 ++--
 10 files changed, 255 insertions(+), 130 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f1134da8/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
index d1eeb3b..222c520 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -273,7 +273,12 @@
         <groupId>org.apache.cloudstack</groupId>
         <artifactId>cloud-plugin-storage-image-swift</artifactId>
         <version>${project.version}</version>
-    </dependency>            
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-plugin-storage-image-simulator</artifactId>
+      <version>${project.version}</version>
+    </dependency>
     <dependency>
       <groupId>org.apache.cloudstack</groupId>
       <artifactId>cloud-plugin-syslog-alerts</artifactId>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f1134da8/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in
index 5c61b4e2..3d5d4fa 100644
--- a/client/tomcatconf/applicationContext.xml.in
+++ b/client/tomcatconf/applicationContext.xml.in
@@ -17,16 +17,14 @@
   under the License.
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-  xmlns:context="http://www.springframework.org/schema/context"
-  xmlns:tx="http://www.springframework.org/schema/tx" 
-  xmlns:aop="http://www.springframework.org/schema/aop"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
                       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-                      http://www.springframework.org/schema/tx 
-                      http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
-                      http://www.springframework.org/schema/aop
-                      http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+
+
+
+
                       http://www.springframework.org/schema/context
                       http://www.springframework.org/schema/context/spring-context-3.0.xsd">
                    
 
@@ -613,7 +611,96 @@
   <bean id="OvmGuru" class="com.cloud.ovm.hypervisor.OvmGuru">
     <property name="name" value="OvmGuru"/>
   </bean>
-  
+
+
+  <!--=====================================================================================================-->
+  <!--                                                                               
                     -->
+  <!--                           Storage Subsystem Components and Helpers            
                     -->
+  <!--                                                                               
                     -->
+  <!--=====================================================================================================-->
+
+  <!--Filesystem types-->
+  <bean id="iSCSI" class="org.apache.cloudstack.storage.datastore.type.ISCSI" />
+  <bean id="networkFileSystem" class="org.apache.cloudstack.storage.datastore.type.NetworkFileSystem"
/>
+
+  <!--Image formats-->
+  <bean id="ISO" class="org.apache.cloudstack.storage.image.format.ISO" />
+  <bean id="OVA" class="org.apache.cloudstack.storage.image.format.OVA" />
+  <bean id="QCOW2" class="org.apache.cloudstack.storage.image.format.QCOW2" />
+  <bean id="VHD" class="org.apache.cloudstack.storage.image.format.VHD" />
+  <bean id="unknown" class="org.apache.cloudstack.storage.image.format.Unknown" />
+
+  <!--Data Store Services -->
+  <bean id="snapshotServiceImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotServiceImpl"
+        depends-on="snapshotStateMachineManagerImpl, snapshotDataFactoryImpl, dataStoreManagerImpl,
dataMotionServiceImpl, objectInDataStoreManagerImpl"/>
+  <bean id="templateServiceImpl" class="org.apache.cloudstack.storage.image.TemplateServiceImpl"
+        depends-on="dataObjectManagerImpl, dataStoreManagerImpl, dataMotionServiceImpl, objectInDataStoreManagerImpl,
defaultEndPointSelector, templateDataFactoryImpl"/>
+  <bean id="volumeServiceImpl" class="org.apache.cloudstack.storage.volume.VolumeServiceImpl"
+        depends-on="snapshotManagerImpl, dataMotionServiceImpl"/>
+
+  <bean id="xenserverSnapshotStrategy" class="org.apache.cloudstack.storage.snapshot.XenserverSnapshotStrategy"
/>
+
+  <!--Data Store Factory-->
+  <bean id="templateDataFactoryImpl" class="org.apache.cloudstack.storage.image.TemplateDataFactoryImpl"
/>
+  <bean id="snapshotDataFactoryImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotDataFactoryImpl"
+        depends-on="dataStoreManagerImpl, snapshotDataStoreDaoImpl, volumeDataFactoryImpl"/>
+  <bean id="volumeDataFactoryImpl" class="org.apache.cloudstack.storage.volume.VolumeDataFactoryImpl"
/>
+
+  <bean id="objectInDataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.ObjectInDataStoreManagerImpl"
/>
+  <bean id="dataObjectManagerImpl" class="org.apache.cloudstack.storage.datastore.DataObjectManagerImpl"
/>
+
+  <!--Data Store Helpers-->
+  <bean id="primaryDataStoreHelper" class="org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper"
/>
+  <bean id="imageStoreHelper" class="org.apache.cloudstack.storage.image.datastore.ImageStoreHelper"
/>
+  <bean id="imageFormatHelper" class="org.apache.cloudstack.storage.image.format.ImageFormatHelper"
/>
+
+  <bean id="storageCacheRandomAllocator" class="org.apache.cloudstack.storage.cache.allocator.StorageCacheRandomAllocator"
/>
+  <bean id="storageCacheManagerImpl" class="org.apache.cloudstack.storage.cache.manager.StorageCacheManagerImpl"
 />
+  <bean id="StorageCacheReplacementAlgorithm" class="org.apache.cloudstack.storage.cache.manager.StorageCacheReplacementAlgorithmLRU"
/>
+
+  <bean id="snapshotStateMachineManagerImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotStateMachineManagerImpl"
/>
+  <bean id="defaultEndPointSelector" class="org.apache.cloudstack.storage.endpoint.DefaultEndPointSelector"
/>
+
+
+  <bean id="ancientDataMotionStrategy" class="org.apache.cloudstack.storage.motion.AncientDataMotionStrategy"
/>
+  <bean id="xenserverStorageMotionStrategy" class="org.apache.cloudstack.storage.motion.XenServerStorageMotionStrategy"
/>
+
+  <!--Data Motion Services-->
+  <bean id="dataMotionServiceImpl" class="org.apache.cloudstack.storage.motion.DataMotionServiceImpl">
+    <property name="strategies">
+      <list>
+        <ref local="ancientDataMotionStrategy"/>
+        <ref local="xenserverStorageMotionStrategy"/>
+      </list>
+    </property>
+  </bean>
+
+  <!--
+    Data Store Provider Manager
+  -->
+  <bean id="primaryDataStoreProviderMgr"
+        class="org.apache.cloudstack.storage.datastore.manager.PrimaryDataStoreProviderManagerImpl"/>
+  <bean id="imageStoreProviderMgr" class="org.apache.cloudstack.storage.image.manager.ImageStoreProviderManagerImpl"/>
+
+  <bean id="dataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.DataStoreManagerImpl"
+        depends-on="dataStoreProviderManager">
+    <property name="primaryStoreMgr" ref="primaryDataStoreProviderMgr"/>
+    <property name="imageDataStoreMgr" ref="imageStoreProviderMgr"/>
+  </bean>
+
+  <bean id="CloudStackPrimaryDataStoreProviderImpl"
+        class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl"/>
+
+  <bean id="dataStoreProviderManager"
+        class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
+    <property name="providers">
+      <list>
+        <!--Data Store Providers-->
+        <ref bean="CloudStackPrimaryDataStoreProviderImpl"/>
+      </list>
+    </property>
+  </bean>
+
   <!--
     Managers
   -->
@@ -622,15 +709,15 @@
     <property name="UserPasswordEncoders" value="#{userPasswordEncoders.Adapters}" />
     <property name="SecurityCheckers" value="#{securityCheckers.Adapters}" />
   </bean>
-  
+
   <bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl">
     <property name="UserAuthenticators" value="#{userAuthenticators.Adapters}" />
     <property name="UserPasswordEncoders" value="#{userPasswordEncoders.Adapters}" />
     <property name="HostAllocators" value="#{hostAllocators.Adapters}" />
-	<property name="AffinityGroupProcessors" value="#{affinityProcessors.Adapters}" />
-	<property name="Planners" value="#{deploymentPlanners.Adapters}" />
+    <property name="AffinityGroupProcessors" value="#{affinityProcessors.Adapters}" />
+    <property name="Planners" value="#{deploymentPlanners.Adapters}" />
   </bean>
-  
+
   <bean id="storageManagerImpl" class="com.cloud.storage.StorageManagerImpl">
     <property name="StoragePoolAllocators" value="#{storagePoolAllocators.Adapters}" />
   </bean>
@@ -638,7 +725,7 @@
   <bean id="FirstFitPlanner" class="com.cloud.deploy.FirstFitPlanner">
     <property name="name" value="FirstFitPlanner"/>
   </bean>
-  
+
   <bean id="resourceManagerImpl" class="com.cloud.resource.ResourceManagerImpl" >
     <property name="PodAllocators" value="#{podAllocators.Adapters}" />
     <property name="Discoverers" value="#{resourceDiscoverers.Adapters}" />
@@ -653,7 +740,7 @@
     <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}" />
@@ -664,9 +751,9 @@
   <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" />
   <bean id="clusteredAgentManagerImpl" class="com.cloud.agent.manager.ClusteredAgentManagerImpl"
/>
 
@@ -685,7 +772,7 @@
   <bean id="capacityManagerImpl" class="com.cloud.capacity.CapacityManagerImpl" />
   <bean id="clusterFenceManagerImpl" class="com.cloud.cluster.ClusterFenceManagerImpl"
/>
   <bean id="configurationManagerImpl" class="com.cloud.configuration.ConfigurationManagerImpl"
/>
-  <bean id="dataStoreProviderManagerImpl" class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl"
/>
+
   <bean id="elasticLoadBalancerManagerImpl" class="com.cloud.network.lb.ElasticLoadBalancerManagerImpl"
/>
   <bean id="entityManagerImpl" class="com.cloud.dao.EntityManagerImpl" />
   <bean id="externalDeviceUsageManagerImpl" class="com.cloud.network.ExternalDeviceUsageManagerImpl"
/>
@@ -724,17 +811,14 @@
   <bean id="vpcManagerImpl" class="com.cloud.network.vpc.VpcManagerImpl" />
   <bean id="vpcVirtualNetworkApplianceManagerImpl" class="com.cloud.network.router.VpcVirtualNetworkApplianceManagerImpl"
/>
 
+
+
   <!--
     Misc components
   -->
   <bean id="actionEventUtils" class="com.cloud.event.ActionEventUtils" />
   <bean id="agentMonitor" class="com.cloud.agent.manager.AgentMonitor" />
   <bean id="alertGenerator" class="com.cloud.event.AlertGenerator" />
-  <bean id="ancientDataMotionStrategy" class="org.apache.cloudstack.storage.motion.AncientDataMotionStrategy"
/>
-  <bean id="storageCacheManagerImpl" class="org.apache.cloudstack.storage.cache.manager.StorageCacheManagerImpl"
 />
-  <bean id="storageCacheRandomAllocator" class="org.apache.cloudstack.storage.cache.allocator.StorageCacheRandomAllocator"
/>
-  <bean id="xenserverSnapshotStrategy" class="org.apache.cloudstack.storage.snapshot.XenserverSnapshotStrategy"
/>
-  <bean id="xenserverStorageMotionStrategy" class="org.apache.cloudstack.storage.motion.XenServerStorageMotionStrategy"
/>
   <bean id="apiDBUtils" class="com.cloud.api.ApiDBUtils" />
   <bean id="apiDiscoveryServiceImpl" class="org.apache.cloudstack.discovery.ApiDiscoveryServiceImpl"
/>
   <bean id="apiDispatcher" class="com.cloud.api.ApiDispatcher" />
@@ -747,46 +831,24 @@
   <bean id="consoleProxyServlet" class="com.cloud.servlet.ConsoleProxyServlet" />
   <bean id="dataCenterResourceManagerImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceManagerImpl"
/>
   <bean id="dataDisk" class="org.apache.cloudstack.engine.subsystem.api.storage.type.DataDisk"
/>
-  <bean id="dataMotionServiceImpl" class="org.apache.cloudstack.storage.motion.DataMotionServiceImpl"
/>
-  <bean id="dataObjectManagerImpl" class="org.apache.cloudstack.storage.datastore.DataObjectManagerImpl"
/>
-  <bean id="dataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.DataStoreManagerImpl"
/>
-  <bean id="defaultEndPointSelector" class="org.apache.cloudstack.storage.endpoint.DefaultEndPointSelector"
/>
-  <bean id="primaryDataStoreProviderManagerImpl" class="org.apache.cloudstack.storage.datastore.manager.PrimaryDataStoreProviderManagerImpl"
/>
-  <bean id="imageStoreProviderManagerImpl" class="org.apache.cloudstack.storage.image.manager.ImageStoreProviderManagerImpl"
/>  
+
+
   <bean id="eventUtils" class="com.cloud.event.EventUtils" />
-  <bean id="iSCSI" class="org.apache.cloudstack.storage.datastore.type.ISCSI" />
-  <bean id="ISO" class="org.apache.cloudstack.storage.image.format.ISO" />
-  <bean id="templateDataFactoryImpl" class="org.apache.cloudstack.storage.image.TemplateDataFactoryImpl"
/>
-  <bean id="imageStoreHelper" class="org.apache.cloudstack.storage.image.datastore.ImageStoreHelper"
/>
-  <bean id="imageFormatHelper" class="org.apache.cloudstack.storage.image.format.ImageFormatHelper"
/>
-  <bean id="templateServiceImpl" class="org.apache.cloudstack.storage.image.TemplateServiceImpl"
/>
+  <bean id="podRestService" class="org.apache.cloudstack.engine.rest.service.api.PodRestService"
/>
   <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="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="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"
/>
-  <bean id="snapshotServiceImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotServiceImpl"
/>
-  <bean id="snapshotStateMachineManagerImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotStateMachineManagerImpl"
/>
+  <bean id="registerCompleteServlet" class="com.cloud.servlet.RegisterCompleteServlet"
/>
   <bean id="statsCollector" class="com.cloud.server.StatsCollector" />
   <bean id="storagePoolAutomationImpl" class="com.cloud.storage.StoragePoolAutomationImpl"
/>
-  <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="vMEntityManagerImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl"
/>
   <bean id="virtualMachineEntityFactory" class="org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityFactory"
/>
   <bean id="virtualMachineEntityImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl"
/>
   <bean id="virtualMachineRestService" class="org.apache.cloudstack.engine.rest.service.api.VirtualMachineRestService"
/>
-  <bean id="volumeDataFactoryImpl" class="org.apache.cloudstack.storage.volume.VolumeDataFactoryImpl"
/>
   <bean id="volumeRestService" class="org.apache.cloudstack.engine.rest.service.api.VolumeRestService"
/>
-  <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"
/>
   <bean id="cloudZonesStartupProcessor" class="com.cloud.hypervisor.CloudZonesStartupProcessor"
/>
@@ -796,21 +858,18 @@
   <bean id="downloadMonitorImpl" class="com.cloud.storage.download.DownloadMonitorImpl"
/>
   <bean id="lBHealthCheckManagerImpl" class="com.cloud.network.lb.LBHealthCheckManagerImpl"
/>
   <bean id="mockAgentManagerImpl" class="com.cloud.agent.manager.MockAgentManagerImpl"
/>
+
+  <bean id="volumeManagerImpl" class="com.cloud.storage.VolumeManagerImpl" />
+  <bean id="ApplicationLoadBalancerService" class="org.apache.cloudstack.network.lb.ApplicationLoadBalancerManagerImpl"
/>
+  <bean id="InternalLoadBalancerVMManager" class="org.apache.cloudstack.network.lb.InternalLoadBalancerVMManagerImpl"
/>
+
+  <!--Simulator Components-->
+  <!--<bean id="simulatorImageStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.SimulatorImageStoreProviderImpl"
/>-->
   <bean id="mockStorageManagerImpl" class="com.cloud.agent.manager.MockStorageManagerImpl"
/>
   <bean id="mockVmManagerImpl" class="com.cloud.agent.manager.MockVmManagerImpl" />
   <bean id="mockNetworkManagerImpl" class="com.cloud.agent.manager.MockNetworkManagerImpl"
/>
   <bean id="simulatorManagerImpl" class="com.cloud.agent.manager.SimulatorManagerImpl"
/>
   <bean id="vMSnapshotManagerImpl" class="com.cloud.vm.snapshot.VMSnapshotManagerImpl"
/>
-  <bean id="volumeManagerImpl" class="com.cloud.storage.VolumeManagerImpl" />
-  <bean id="ClassicalPrimaryDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl"
/>
-  <bean id="cloudStackImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.CloudStackImageStoreProviderImpl"
/>
-  <bean id="s3ImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.S3ImageStoreProviderImpl"
/>
-  <bean id="swiftImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.SwiftImageStoreProviderImpl"
/>
-  <bean id="solidFireDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.SolidfirePrimaryDataStoreProvider"
/>
-  <bean id="simulatorImageStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.SimulatorImageStoreProviderImpl"
/>
-  <bean id="ApplicationLoadBalancerService" class="org.apache.cloudstack.network.lb.ApplicationLoadBalancerManagerImpl"
/>
-  <bean id="InternalLoadBalancerVMManager" class="org.apache.cloudstack.network.lb.InternalLoadBalancerVMManagerImpl"
/>
-  <bean id="StorageCacheReplacementAlgorithm" class="org.apache.cloudstack.storage.cache.manager.StorageCacheReplacementAlgorithmLRU"
/>
 
 
 <!--=======================================================================================================-->

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f1134da8/client/tomcatconf/componentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/componentContext.xml.in b/client/tomcatconf/componentContext.xml.in
index d2c2dee..a149327 100644
--- a/client/tomcatconf/componentContext.xml.in
+++ b/client/tomcatconf/componentContext.xml.in
@@ -18,9 +18,9 @@
   under the License.
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:context="http://www.springframework.org/schema/context"
-  xmlns:tx="http://www.springframework.org/schema/tx" 
+  xmlns:tx="http://www.springframework.org/schema/tx"
   xmlns:aop="http://www.springframework.org/schema/aop"
   xsi:schemaLocation="http://www.springframework.org/schema/beans
                       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
@@ -31,6 +31,8 @@
                       http://www.springframework.org/schema/context
                       http://www.springframework.org/schema/context/spring-context-3.0.xsd">
 
+  <context:annotation-config />
+
 
 <!--
 
@@ -95,7 +97,26 @@
 
   It determines whether or not a adapter is activated or how it is loaded in order in its
managing provider,
 
---> 
+-->
+  <bean id="CloudStackImageStoreProviderImpl"
+        class="org.apache.cloudstack.storage.datastore.provider.CloudStackImageStoreProviderImpl"/>
+  <bean id="S3ImageStoreProviderImpl"
+        class="org.apache.cloudstack.storage.datastore.provider.S3ImageStoreProviderImpl"/>
+  <bean id="SwiftImageStoreProviderImpl"
+        class="org.apache.cloudstack.storage.datastore.provider.SwiftImageStoreProviderImpl"/>
+
+  <!--Storage Providers-->
+  <bean id="dataStoreProviderManager"
+        class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
+    <property name="providers">
+      <list merge="true">
+        <ref bean="CloudStackPrimaryDataStoreProviderImpl"/>
+        <ref local="CloudStackImageStoreProviderImpl"/>
+        <ref local="S3ImageStoreProviderImpl"/>
+        <ref local="SwiftImageStoreProviderImpl"/>
+      </list>
+    </property>
+  </bean>
 
   <!-- Security adapters -->
   <bean id="userAuthenticators" class="com.cloud.utils.component.AdapterList">

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f1134da8/client/tomcatconf/nonossComponentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/nonossComponentContext.xml.in b/client/tomcatconf/nonossComponentContext.xml.in
index 7b65e71..4ea1d31 100644
--- a/client/tomcatconf/nonossComponentContext.xml.in
+++ b/client/tomcatconf/nonossComponentContext.xml.in
@@ -80,7 +80,6 @@
   <bean id="VmwareDatacenterDaoImpl" class="com.cloud.hypervisor.vmware.dao.VmwareDatacenterDaoImpl"
/>
   <bean id="VmwareDatacenterZoneMapDaoImpl" class="com.cloud.hypervisor.vmware.dao.VmwareDatacenterZoneMapDaoImpl"
/>
   <bean id="LegacyZoneDaoImpl" class="com.cloud.hypervisor.vmware.dao.LegacyZoneDaoImpl"
/>
-  <bean id="vmwareStorageMotionStrategy" class="org.apache.cloudstack.storage.motion.VmwareStorageMotionStrategy"/>
 
   <!--
     Nicira support components
@@ -182,7 +181,35 @@
     
   It determines whether or not a adapter is activated or how it is loaded in order in its
managing provider,
      
---> 
+-->
+
+
+  <!--Motion Strategies-->
+  <bean id="vmwareStorageMotionStrategy" class="org.apache.cloudstack.storage.motion.VmwareStorageMotionStrategy"
/>
+  <bean id="dataMotionServiceImpl" class="org.apache.cloudstack.storage.motion.DataMotionServiceImpl">
+    <property name="strategies">
+      <list>
+        <ref bean="ancientDataMotionStrategy"/>
+        <ref bean="xenserverStorageMotionStrategy"/>
+        <ref local="vmwareStorageMotionStrategy"/>
+      </list>
+    </property>
+  </bean>
+
+  <!--<bean id="SolidfirePrimaryDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.SolidfirePrimaryDataStoreProvider"/>-->
+  <!--Storage Providers-->
+  <bean id="dataStoreProviderManager"
+        class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
+    <property name="providers">
+      <list merge="true">
+        <ref bean="CloudStackPrimaryDataStoreProviderImpl"/>
+        <ref bean="CloudStackImageStoreProviderImpl"/>
+        <ref bean="S3ImageStoreProviderImpl"/>
+        <ref bean="SwiftImageStoreProviderImpl"/>
+        <!--<ref local="SolidfirePrimaryDataStoreProvider"/>-->
+      </list>
+    </property>
+  </bean>
 
   <!-- Security adapters -->
   <bean id="userAuthenticators" class="com.cloud.utils.component.AdapterList">

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f1134da8/client/tomcatconf/simulatorComponentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/simulatorComponentContext.xml.in b/client/tomcatconf/simulatorComponentContext.xml.in
index cfe0a9a..74312fe 100644
--- a/client/tomcatconf/simulatorComponentContext.xml.in
+++ b/client/tomcatconf/simulatorComponentContext.xml.in
@@ -18,17 +18,8 @@
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xmlns:tx="http://www.springframework.org/schema/tx"
-       xmlns:aop="http://www.springframework.org/schema/aop"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-                      http://www.springframework.org/schema/tx
-                      http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
-                      http://www.springframework.org/schema/aop
-                      http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
-                      http://www.springframework.org/schema/context
-                      http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
 
   <!--
     OSS deployment component configuration
@@ -36,10 +27,6 @@
   <bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker"/>
   <bean id="configurationDaoImpl" class="com.cloud.configuration.dao.ConfigurationDaoImpl"/>
 
-  <!-- simulator components -->
-  <!--<bean id="SimulatorSecondaryDiscoverer" class="com.cloud.resource.SimulatorSecondaryDiscoverer">-->
-    <!--<property name="name" value="SecondaryStorage"/>-->
-  <!--</bean>-->
   <bean id="SimulatorDiscoverer" class="com.cloud.resource.SimulatorDiscoverer">
     <property name="name" value="Simulator Agent"/>
   </bean>
@@ -47,6 +34,23 @@
     <property name="name" value="Simulator Guru"/>
   </bean>
 
+  <bean id="SimulatorImageStoreProviderImpl"
+        class="org.apache.cloudstack.storage.datastore.provider.SimulatorImageStoreProviderImpl"/>
+
+  <!--Storage Providers-->
+  <!--<bean id="dataStoreProviderManagerChild" parent="dataStoreProviderManager">-->
+  <bean id="dataStoreProviderManager"
+        class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
+    <property name="providers">
+      <!--Override the cloudstack default image store provider to use simulator defined
provider-->
+      <list>
+        <!--Data Store Providers-->
+        <ref bean="CloudStackPrimaryDataStoreProviderImpl"/>
+        <ref bean="SimulatorImageStoreProviderImpl"/>
+      </list>
+    </property>
+  </bean>
+
   <!--
     Managers & pluggable adapters configuration under OSS deployment
   -->
@@ -85,7 +89,6 @@
     <property name="Adapters">
       <list>
         <ref bean="SimulatorDiscoverer"/>
-        <ref bean="SimulatorSecondaryDiscoverer"/>
         <ref bean="XcpServerDiscoverer"/>
         <ref bean="SecondaryStorageDiscoverer"/>
         <ref bean="KvmServerDiscoverer"/>
@@ -124,10 +127,6 @@
         <ref bean="FirstFitPlanner"/>
         <ref bean="UserDispersingPlanner"/>
         <ref bean="UserConcentratedPodPlanner"/>
-
-        <!--
-                  <ref bean="BareMetalPlanner" />
-        -->
       </list>
     </property>
   </bean>
@@ -175,9 +174,6 @@
       <list>
         <ref bean="VirtualRouter"/>
         <ref bean="VpcVirtualRouter"/>
-        <!--
-                  <ref bean="BareMetalDhcp"/>
-        -->
       </list>
     </property>
   </bean>
@@ -206,11 +202,6 @@
         <ref bean="SecurityGroupProvider"/>
         <ref bean="VpcVirtualRouter"/>
         <ref bean="InternalLbVm"/>
-        <!--
-                  <ref bean="BareMetalDhcp"/>
-                  <ref bean="BareMetalPxe"/>
-                  <ref bean="BareMetalUserdata"/>
-        -->
       </list>
     </property>
   </bean>
@@ -218,7 +209,8 @@
   <!--
     Image Store
   -->
-  <!--<bean id="simulatorImageStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.SimulatorImageStoreProviderImpl"
/>-->
+
+
 
   <bean id="GlobalLoadBalancingRulesServiceImpl"
         class="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl"/>
@@ -244,5 +236,4 @@
     <property name="name" value="ExplicitDedicationProcessor"/>
     <property name="type" value="ExplicitDedication"/>
   </bean>
-
 </beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f1134da8/developer/pom.xml
----------------------------------------------------------------------
diff --git a/developer/pom.xml b/developer/pom.xml
index a680b8a..e9284f4 100644
--- a/developer/pom.xml
+++ b/developer/pom.xml
@@ -58,6 +58,12 @@
       <version>${project.version}</version>
       <scope>compile</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-plugin-storage-image-simulator</artifactId>
+      <version>${project.version}</version>
+      <scope>compile</scope>
+    </dependency>
   </dependencies>
   <build>
     <defaultGoal>install</defaultGoal>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f1134da8/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/DataMotionServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/DataMotionServiceImpl.java
b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/DataMotionServiceImpl.java
index 22de0b2..c1cbdc7 100644
--- a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/DataMotionServiceImpl.java
+++ b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/DataMotionServiceImpl.java
@@ -18,11 +18,9 @@
  */
 package org.apache.cloudstack.storage.motion;
 
-import java.util.List;
-import java.util.Map;
-
-import javax.inject.Inject;
-
+import com.cloud.agent.api.to.VirtualMachineTO;
+import com.cloud.host.Host;
+import com.cloud.utils.exception.CloudRuntimeException;
 import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataMotionService;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataMotionStrategy;
@@ -32,9 +30,9 @@ import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.springframework.stereotype.Component;
 
-import com.cloud.agent.api.to.VirtualMachineTO;
-import com.cloud.host.Host;
-import com.cloud.utils.exception.CloudRuntimeException;
+import javax.inject.Inject;
+import java.util.List;
+import java.util.Map;
 
 @Component
 public class DataMotionServiceImpl implements DataMotionService {
@@ -72,4 +70,8 @@ public class DataMotionServiceImpl implements DataMotionService {
         }
         throw new CloudRuntimeException("can't find strategy to move data");
     }
+
+    public void setStrategies(List<DataMotionStrategy> strategies) {
+        this.strategies = strategies;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f1134da8/engine/storage/integration-test/test/resource/storageContext.xml
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/resource/storageContext.xml b/engine/storage/integration-test/test/resource/storageContext.xml
index 9f4f102..f9c891a 100644
--- a/engine/storage/integration-test/test/resource/storageContext.xml
+++ b/engine/storage/integration-test/test/resource/storageContext.xml
@@ -81,7 +81,8 @@
   <bean id="ClassicalPrimaryDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl"
/>
   <bean id="cloudStackImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.CloudStackImageStoreProviderImpl"
/>
   <bean id="s3ImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.S3ImageStoreProviderImpl"
/>
-  <bean id="swiftImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.SwiftImageStoreProviderImpl"
/>  
+  <bean id="swiftImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.SwiftImageStoreProviderImpl"
/>
+  <bean id="simulatorImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.SimulatorImageStoreProviderImpl"
/>
   <bean id="BAREMETAL" class="org.apache.cloudstack.storage.image.format.BAREMETAL" />
   <bean id="storagePoolAutomationImpl" class="com.cloud.storage.StoragePoolAutomationImpl"
/>
   <bean id="AccountGuestVlanMapDaoImpl" class="com.cloud.network.dao.AccountGuestVlanMapDaoImpl"
/>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f1134da8/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
index b92f92f..71df262 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
@@ -18,11 +18,9 @@
  */
 package org.apache.cloudstack.storage.datastore;
 
-import java.util.List;
-import java.util.Map;
-
-import javax.inject.Inject;
-
+import com.cloud.storage.DataStoreRole;
+import com.cloud.utils.exception.CloudRuntimeException;
+import edu.emory.mathcs.backport.java.util.Collections;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.Scope;
@@ -30,22 +28,20 @@ import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
 import org.apache.cloudstack.storage.image.datastore.ImageStoreProviderManager;
 import org.springframework.stereotype.Component;
 
-import com.cloud.storage.DataStoreRole;
-import com.cloud.utils.exception.CloudRuntimeException;
-
-import edu.emory.mathcs.backport.java.util.Collections;
+import javax.inject.Inject;
+import java.util.List;
 
 @Component
 public class DataStoreManagerImpl implements DataStoreManager {
     @Inject
-    PrimaryDataStoreProviderManager primaryStorMgr;
+    PrimaryDataStoreProviderManager primaryStoreMgr;
     @Inject
     ImageStoreProviderManager imageDataStoreMgr;
 
     @Override
     public DataStore getDataStore(long storeId, DataStoreRole role) {
         if (role == DataStoreRole.Primary) {
-            return primaryStorMgr.getPrimaryDataStore(storeId);
+            return primaryStoreMgr.getPrimaryDataStore(storeId);
         } else if (role == DataStoreRole.Image) {
             return imageDataStoreMgr.getImageStore(storeId);
         } else if (role == DataStoreRole.ImageCache) {
@@ -57,7 +53,7 @@ public class DataStoreManagerImpl implements DataStoreManager {
     @Override
     public DataStore getDataStore(String uuid, DataStoreRole role) {
         if (role == DataStoreRole.Primary) {
-            return primaryStorMgr.getPrimaryDataStore(uuid);
+            return primaryStoreMgr.getPrimaryDataStore(uuid);
         } else if (role == DataStoreRole.Image) {
             return imageDataStoreMgr.getImageStore(uuid);
         }
@@ -81,7 +77,7 @@ public class DataStoreManagerImpl implements DataStoreManager {
 
     @Override
     public DataStore getPrimaryDataStore(long storeId) {
-        return primaryStorMgr.getPrimaryDataStore(storeId);
+        return primaryStoreMgr.getPrimaryDataStore(storeId);
     }
 
     @Override
@@ -94,4 +90,11 @@ public class DataStoreManagerImpl implements DataStoreManager {
         return imageDataStoreMgr.listImageStores();
     }
 
+    public void setPrimaryStoreMgr(PrimaryDataStoreProviderManager primaryStoreMgr) {
+        this.primaryStoreMgr = primaryStoreMgr;
+    }
+
+    public void setImageDataStoreMgr(ImageStoreProviderManager imageDataStoreMgr) {
+        this.imageDataStoreMgr = imageDataStoreMgr;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f1134da8/engine/storage/src/org/apache/cloudstack/storage/datastore/provider/DataStoreProviderManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/provider/DataStoreProviderManagerImpl.java
b/engine/storage/src/org/apache/cloudstack/storage/datastore/provider/DataStoreProviderManagerImpl.java
index 50238a8..92b4e7a 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/provider/DataStoreProviderManagerImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/provider/DataStoreProviderManagerImpl.java
@@ -18,15 +18,8 @@
  */
 package org.apache.cloudstack.storage.datastore.provider;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.inject.Inject;
-import javax.naming.ConfigurationException;
-
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.utils.component.ManagerBase;
 import org.apache.cloudstack.api.response.StorageProviderResponse;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider.DataStoreProviderType;
@@ -38,8 +31,13 @@ import org.apache.cloudstack.storage.image.datastore.ImageStoreProviderManager;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
-import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.utils.component.ManagerBase;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 @Component
 public class DataStoreProviderManagerImpl extends ManagerBase implements DataStoreProviderManager
{
@@ -50,7 +48,7 @@ public class DataStoreProviderManagerImpl extends ManagerBase implements
DataSto
     @Inject
     PrimaryDataStoreProviderManager primaryDataStoreProviderMgr;
     @Inject
-    ImageStoreProviderManager imageDataStoreProviderMgr;
+    ImageStoreProviderManager imageStoreProviderMgr;
 
     @Override
     public DataStoreProvider getDataStoreProvider(String name) {
@@ -125,7 +123,7 @@ public class DataStoreProviderManagerImpl extends ManagerBase implements
DataSto
                             (PrimaryDataStoreDriver) provider.getDataStoreDriver());
                     primaryDataStoreProviderMgr.registerHostListener(provider.getName(),
provider.getHostListener());
                 } else if (types.contains(DataStoreProviderType.IMAGE)) {
-                    imageDataStoreProviderMgr.registerDriver(provider.getName(),
+                    imageStoreProviderMgr.registerDriver(provider.getName(),
                             (ImageStoreDriver) provider.getDataStoreDriver());
                 }
             } catch (Exception e) {
@@ -168,4 +166,16 @@ public class DataStoreProviderManagerImpl extends ManagerBase implements
DataSto
             throw new InvalidParameterValueException("Invalid parameter: " + type);
         }
     }
+
+    public void setProviders(List<DataStoreProvider> providers) {
+        this.providers = providers;
+    }
+
+    public void setPrimaryDataStoreProviderMgr(PrimaryDataStoreProviderManager primaryDataStoreProviderMgr)
{
+        this.primaryDataStoreProviderMgr = primaryDataStoreProviderMgr;
+    }
+
+    public void setImageStoreProviderMgr(ImageStoreProviderManager imageDataStoreProviderMgr)
{
+        this.imageStoreProviderMgr = imageDataStoreProviderMgr;
+    }
 }


Mime
View raw message