Examples of ImageDataStoreVO


Examples of org.apache.cloudstack.storage.image.db.ImageDataStoreVO

    DataStoreProviderManager providerManager;
    Map<String, ImageDataStoreDriver> driverMaps = new HashMap<String, ImageDataStoreDriver>();

    @Override
    public ImageDataStore getImageDataStore(long dataStoreId) {
        ImageDataStoreVO dataStore = dataStoreDao.findById(dataStoreId);
        long providerId = dataStore.getProvider();
        ImageDataStoreProvider provider = (ImageDataStoreProvider)providerManager.getDataStoreProviderById(providerId);
        ImageDataStore imgStore = HttpDataStoreImpl.getDataStore(dataStore,
                driverMaps.get(provider.getUuid()), provider
                );
        // TODO Auto-generated method stub
View Full Code Here

Examples of org.apache.cloudstack.storage.image.db.ImageDataStoreVO

  }


    @Override
    public DataStore initialize(Map<String, String> dsInfos) {
        ImageDataStoreVO ids = imageStoreHelper.createImageDataStore(dsInfos);
        return imageStoreMgr.getImageDataStore(ids.getId());
    }
View Full Code Here

Examples of org.apache.cloudstack.storage.image.db.ImageDataStoreVO

@Component
public class ImageDataStoreHelper {
    @Inject
    ImageDataStoreDao imageStoreDao;
    public ImageDataStoreVO createImageDataStore(Map<String, String> params) {
        ImageDataStoreVO store = imageStoreDao.findByUuid(params.get("uuid"));
        if (store != null) {
            throw new CloudRuntimeException("duplicate uuid");
        }
        store = new ImageDataStoreVO();
        store.setName(params.get("name"));
        store.setProtocol(params.get("protocol"));
        store.setProvider(Long.parseLong(params.get("provider")));
        store.setScope(Enum.valueOf(ScopeType.class, params.get("scope")));
        store.setUuid(params.get("uuid"));
        store = imageStoreDao.persist(store);
        return store;
    }
View Full Code Here

Examples of org.apache.cloudstack.storage.image.db.ImageDataStoreVO

        store = imageStoreDao.persist(store);
        return store;
    }
   
    public boolean deleteImageDataStore(long id) {
        ImageDataStoreVO store = imageStoreDao.findById(id);
        if (store == null) {
            throw new CloudRuntimeException("can't find image store:" + id);
        }
       
        imageStoreDao.remove(id);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.