Search in sources :

Example 1 with VolumeType

use of com.woorea.openstack.cinder.model.VolumeType in project ovirt-engine by oVirt.

the class OpenStackVolumeProviderProxy method getVolumeTypes.

public List<CinderVolumeType> getVolumeTypes() {
    ArrayList<CinderVolumeType> cinderVolumeTypes = new ArrayList<>();
    OpenStackRequest<VolumeTypes> listRequest = getClient(getTenantId()).volumeTypes().list();
    VolumeTypes volumeTypes = listRequest.execute();
    for (VolumeType volumeType : volumeTypes) {
        CinderVolumeType cinderVolumeType = new CinderVolumeType(volumeType.getId(), volumeType.getName(), volumeType.getExtraSpecs());
        cinderVolumeTypes.add(cinderVolumeType);
    }
    return cinderVolumeTypes;
}
Also used : CinderVolumeType(org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType) VolumeTypes(com.woorea.openstack.cinder.model.VolumeTypes) CinderVolumeType(org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType) VolumeType(com.woorea.openstack.cinder.model.VolumeType) ArrayList(java.util.ArrayList)

Aggregations

VolumeType (com.woorea.openstack.cinder.model.VolumeType)1 VolumeTypes (com.woorea.openstack.cinder.model.VolumeTypes)1 ArrayList (java.util.ArrayList)1 CinderVolumeType (org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType)1