diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java index 09fa3d187c3..e34f07749df 100644 --- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java @@ -231,13 +231,13 @@ public class volumeServiceTest { try { primaryDataStoreProviderMgr.configure("primary data store mgr", new HashMap()); PrimaryDataStoreProvider provider = primaryDataStoreProviderMgr.getDataStoreProvider("default primary data store provider"); - PrimaryDataStoreLifeCycle lifeCycle = provider.getDataStoreLifeCycle(); + Map params = new HashMap(); params.put("url", "nfs://test/test"); params.put("dcId", dcId.toString()); params.put("clusterId", clusterId.toString()); params.put("name", "my primary data store"); - PrimaryDataStoreInfo primaryDataStoreInfo = lifeCycle.registerDataStore(params); + PrimaryDataStoreInfo primaryDataStoreInfo = provider.registerDataStore(params); return primaryDataStoreInfo; } catch (ConfigurationException e) { return null; @@ -293,7 +293,7 @@ public class volumeServiceTest { DefaultPrimaryDatastoreProviderImpl provider = ComponentInject.inject(DefaultPrimaryDatastoreProviderImpl.class); //assertNotNull(provider.dataStoreDao); - DefaultPrimaryDataStore dpdsi = DefaultPrimaryDataStore.createDataStore(null, null, null); + DefaultPrimaryDataStore dpdsi = DefaultPrimaryDataStore.createDataStore(null); //assertNotNull(dpdsi.volumeDao); } diff --git a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/provider/SolidfirePrimaryDataStoreProvider.java b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/provider/SolidfirePrimaryDataStoreProvider.java index 2fbcc2c5157..672a72648d7 100644 --- a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/provider/SolidfirePrimaryDataStoreProvider.java +++ b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/provider/SolidfirePrimaryDataStoreProvider.java @@ -1,10 +1,14 @@ package org.apache.cloudstack.storage.datastore.provider; +import java.util.List; + import org.apache.cloudstack.storage.datastore.DefaultPrimaryDataStore; import org.apache.cloudstack.storage.datastore.PrimaryDataStore; +import org.apache.cloudstack.storage.datastore.configurator.PrimaryDataStoreConfigurator; import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreVO; import org.apache.cloudstack.storage.datastore.driver.SolidfirePrimaryDataStoreDriver; import org.apache.cloudstack.storage.datastore.lifecycle.DefaultPrimaryDataStoreLifeCycleImpl; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; @Component @@ -13,8 +17,8 @@ public class SolidfirePrimaryDataStoreProvider extends private final String name = "Solidfre Primary Data Store Provider"; - public SolidfirePrimaryDataStoreProvider() { - super(); + public SolidfirePrimaryDataStoreProvider(@Qualifier("solidfire") List configurators) { + super(configurators); // TODO Auto-generated constructor stub } @@ -35,7 +39,7 @@ public class SolidfirePrimaryDataStoreProvider extends SolidfirePrimaryDataStoreDriver driver = new SolidfirePrimaryDataStoreDriver(); pds.setDriver(driver); - DefaultPrimaryDataStoreLifeCycleImpl lifeCycle = new DefaultPrimaryDataStoreLifeCycleImpl(super.dataStoreDao, pds); + DefaultPrimaryDataStoreLifeCycleImpl lifeCycle = new DefaultPrimaryDataStoreLifeCycleImpl(dataStoreDao); pds.setLifeCycle(lifeCycle); return pds; }