diff --git a/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml b/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml index 170d33d8588..1de9a04fc6b 100644 --- a/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml +++ b/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml @@ -184,4 +184,14 @@ + + + + + + + + \ No newline at end of file diff --git a/core/resources/META-INF/cloudstack/storage/spring-lifecycle-storage-context-inheritable.xml b/core/resources/META-INF/cloudstack/storage/spring-lifecycle-storage-context-inheritable.xml index 617dd214326..b6eed7d342b 100644 --- a/core/resources/META-INF/cloudstack/storage/spring-lifecycle-storage-context-inheritable.xml +++ b/core/resources/META-INF/cloudstack/storage/spring-lifecycle-storage-context-inheritable.xml @@ -49,6 +49,7 @@ + @@ -56,5 +57,18 @@ value="com.cloud.agent.manager.allocator.PodAllocator" /> + + + + + + + + + + + diff --git a/engine/storage/datamotion/resources/META-INF/cloudstack/core/spring-engine-storage-datamotion-core-context.xml b/engine/storage/datamotion/resources/META-INF/cloudstack/core/spring-engine-storage-datamotion-core-context.xml index 822644eb232..07c0fdf16c3 100644 --- a/engine/storage/datamotion/resources/META-INF/cloudstack/core/spring-engine-storage-datamotion-core-context.xml +++ b/engine/storage/datamotion/resources/META-INF/cloudstack/core/spring-engine-storage-datamotion-core-context.xml @@ -26,20 +26,10 @@ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd" > - - - - - - - - + - - + diff --git a/engine/storage/datamotion/resources/META-INF/cloudstack/storage/spring-engine-storage-datamotion-storage-context.xml b/engine/storage/datamotion/resources/META-INF/cloudstack/storage/spring-engine-storage-datamotion-storage-context.xml new file mode 100644 index 00000000000..725f7d35be5 --- /dev/null +++ b/engine/storage/datamotion/resources/META-INF/cloudstack/storage/spring-engine-storage-datamotion-storage-context.xml @@ -0,0 +1,34 @@ + + + + + + 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 9f0f5311a28..4da73058b39 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 @@ -36,7 +36,7 @@ import java.util.Map; @Component public class DataMotionServiceImpl implements DataMotionService { - @Inject + List strategies; @Override @@ -74,7 +74,12 @@ public class DataMotionServiceImpl implements DataMotionService { throw new CloudRuntimeException("can't find strategy to move data"); } + @Inject public void setStrategies(List strategies) { this.strategies = strategies; } + + public List getStrategies() { + return strategies; + } } diff --git a/engine/storage/snapshot/resources/META-INF/cloudstack/core/spring-engine-storage-snapshot-core-context.xml b/engine/storage/snapshot/resources/META-INF/cloudstack/core/spring-engine-storage-snapshot-core-context.xml index c9c89e3f3d1..308899280dc 100644 --- a/engine/storage/snapshot/resources/META-INF/cloudstack/core/spring-engine-storage-snapshot-core-context.xml +++ b/engine/storage/snapshot/resources/META-INF/cloudstack/core/spring-engine-storage-snapshot-core-context.xml @@ -31,9 +31,6 @@ class="org.apache.cloudstack.storage.snapshot.SnapshotServiceImpl" depends-on="snapshotStateMachineManagerImpl, snapshotDataFactoryImpl, dataStoreManagerImpl, dataMotionServiceImpl, objectInDataStoreManagerImpl" /> - - diff --git a/engine/storage/snapshot/resources/META-INF/cloudstack/storage/spring-engine-storage-snapshot-storage-context.xml b/engine/storage/snapshot/resources/META-INF/cloudstack/storage/spring-engine-storage-snapshot-storage-context.xml new file mode 100644 index 00000000000..3faa89482c6 --- /dev/null +++ b/engine/storage/snapshot/resources/META-INF/cloudstack/storage/spring-engine-storage-snapshot-storage-context.xml @@ -0,0 +1,33 @@ + + + + + + \ No newline at end of file diff --git a/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml b/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml index 11b69d213ad..7400759547a 100644 --- a/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml +++ b/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml @@ -142,7 +142,9 @@ - + + + diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index 2297e6adde3..93377050ff3 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -195,7 +195,7 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager, @Inject EndPointSelector _epSelector; @Inject private ResourceManager _resourceMgr; - @Inject + protected List snapshotStrategies; @@ -1193,4 +1193,13 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager, } return snapshot; } + + public List getSnapshotStrategies() { + return snapshotStrategies; + } + + @Inject + public void setSnapshotStrategies(List snapshotStrategies) { + this.snapshotStrategies = snapshotStrategies; + } }