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
public class SolidfirePrimaryDataStoreProvider extends
	DefaultPrimaryDatastoreProviderImpl {
	private final String name = "Solidfre Primary Data Store Provider";


	public SolidfirePrimaryDataStoreProvider(@Qualifier("solidfire") List<PrimaryDataStoreConfigurator> configurators) {
	    super(configurators);
		
		// TODO Auto-generated constructor stub
	}
	
	@Override
	public String getName() {
		return name;
	}
	
	@Override
	public PrimaryDataStore getDataStore(long dataStoreId) {
		PrimaryDataStoreVO dsv = dataStoreDao.findById(dataStoreId);
        if (dsv == null) {
            return null;
        }

        DefaultPrimaryDataStore pds = DefaultPrimaryDataStore.createDataStore(dsv);
        SolidfirePrimaryDataStoreDriver driver = new SolidfirePrimaryDataStoreDriver();
        pds.setDriver(driver);
<<<<<<< HEAD
        
        DefaultPrimaryDataStoreLifeCycleImpl lifeCycle = new DefaultPrimaryDataStoreLifeCycleImpl(dataStoreDao);
=======

        DefaultPrimaryDataStoreLifeCycleImpl lifeCycle = new DefaultPrimaryDataStoreLifeCycleImpl(super.dataStoreDao, pds);
>>>>>>> Getting things to compile
        pds.setLifeCycle(lifeCycle);
        return pds;
    }
}

@@ -1499,20 +1499,8 @@
 r);%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD
 %0A   
@@ -1622,174 +1622,8 @@
 o);%0A
-=======%0A%0A        DefaultPrimaryDataStoreLifeCycleImpl lifeCycle = new DefaultPrimaryDataStoreLifeCycleImpl(super.dataStoreDao, pds);%0A%3E%3E%3E%3E%3E%3E%3E Getting things to compile
 %0A   

fix build