Search in sources :

Example 36 with ImageStoreVO

use of org.apache.cloudstack.storage.datastore.db.ImageStoreVO in project cloudstack by apache.

the class ImageStoreProviderManagerImpl method listImageStoresByScope.

@Override
public List<DataStore> listImageStoresByScope(ZoneScope scope) {
    List<ImageStoreVO> stores = dataStoreDao.findByScope(scope);
    List<DataStore> imageStores = new ArrayList<DataStore>();
    for (ImageStoreVO store : stores) {
        imageStores.add(getImageStore(store.getId()));
    }
    return imageStores;
}
Also used : DataStore(org.apache.cloudstack.engine.subsystem.api.storage.DataStore) ArrayList(java.util.ArrayList) ImageStoreVO(org.apache.cloudstack.storage.datastore.db.ImageStoreVO)

Example 37 with ImageStoreVO

use of org.apache.cloudstack.storage.datastore.db.ImageStoreVO in project cloudstack by apache.

the class ImageStoreProviderManagerImpl method listImageStores.

@Override
public List<DataStore> listImageStores() {
    List<ImageStoreVO> stores = dataStoreDao.listImageStores();
    List<DataStore> imageStores = new ArrayList<DataStore>();
    for (ImageStoreVO store : stores) {
        imageStores.add(getImageStore(store.getId()));
    }
    return imageStores;
}
Also used : DataStore(org.apache.cloudstack.engine.subsystem.api.storage.DataStore) ArrayList(java.util.ArrayList) ImageStoreVO(org.apache.cloudstack.storage.datastore.db.ImageStoreVO)

Example 38 with ImageStoreVO

use of org.apache.cloudstack.storage.datastore.db.ImageStoreVO in project cloudstack by apache.

the class ImageStoreProviderManagerImpl method listImageStoreByProvider.

@Override
public List<DataStore> listImageStoreByProvider(String provider) {
    List<ImageStoreVO> stores = dataStoreDao.findByProvider(provider);
    List<DataStore> imageStores = new ArrayList<DataStore>();
    for (ImageStoreVO store : stores) {
        imageStores.add(getImageStore(store.getId()));
    }
    return imageStores;
}
Also used : DataStore(org.apache.cloudstack.engine.subsystem.api.storage.DataStore) ArrayList(java.util.ArrayList) ImageStoreVO(org.apache.cloudstack.storage.datastore.db.ImageStoreVO)

Aggregations

ImageStoreVO (org.apache.cloudstack.storage.datastore.db.ImageStoreVO)38 DataStore (org.apache.cloudstack.engine.subsystem.api.storage.DataStore)14 InvalidParameterValueException (com.cloud.exception.InvalidParameterValueException)12 Account (com.cloud.user.Account)10 DataCenterVO (com.cloud.dc.DataCenterVO)9 HashMap (java.util.HashMap)9 VMTemplateVO (com.cloud.storage.VMTemplateVO)8 ArrayList (java.util.ArrayList)8 ClusterVO (com.cloud.dc.ClusterVO)6 HostPodVO (com.cloud.dc.HostPodVO)5 CloudRuntimeException (com.cloud.utils.exception.CloudRuntimeException)5 Map (java.util.Map)5 HostVO (com.cloud.host.HostVO)4 DataStoreRole (com.cloud.storage.DataStoreRole)4 PermissionDeniedException (com.cloud.exception.PermissionDeniedException)3 HypervisorType (com.cloud.hypervisor.Hypervisor.HypervisorType)3 URISyntaxException (java.net.URISyntaxException)3 DataStoreProvider (org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider)3 Test (org.testng.annotations.Test)3 ClusterDetailsVO (com.cloud.dc.ClusterDetailsVO)2