Search in sources :

Example 6 with CinderVolumeType

use of org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType in project ovirt-engine by oVirt.

the class AbstractDiskModel method updateCinderVolumeTypes.

protected void updateCinderVolumeTypes() {
    StorageDomain storageDomain = getStorageDomain().getSelectedItem();
    if (storageDomain == null || storageDomain.getStorageType() != StorageType.CINDER) {
        return;
    }
    AsyncDataProvider.getInstance().getCinderVolumeTypesList(new AsyncQuery<>(cinderVolumeTypes -> {
        List<String> volumeTypesNames = new ArrayList<>();
        for (CinderVolumeType cinderVolumeType : cinderVolumeTypes) {
            volumeTypesNames.add(cinderVolumeType.getName());
        }
        getCinderVolumeType().setItems(volumeTypesNames);
    }), storageDomain.getId());
}
Also used : Arrays(java.util.Arrays) CinderDisk(org.ovirt.engine.core.common.businessentities.storage.CinderDisk) PropagateErrors(org.ovirt.engine.core.common.businessentities.storage.PropagateErrors) SpecialAsciiI18NOrNoneValidation(org.ovirt.engine.ui.uicommonweb.validation.SpecialAsciiI18NOrNoneValidation) LunDisk(org.ovirt.engine.core.common.businessentities.storage.LunDisk) Event(org.ovirt.engine.ui.uicompat.Event) SearchableListModel(org.ovirt.engine.ui.uicommonweb.models.SearchableListModel) QuotaEnforcementTypeEnum(org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum) EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) ConstantsManager(org.ovirt.engine.ui.uicompat.ConstantsManager) HasEntity(org.ovirt.engine.ui.uicommonweb.models.HasEntity) Version(org.ovirt.engine.core.compat.Version) EventArgs(org.ovirt.engine.ui.uicompat.EventArgs) AsyncDataProvider(org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider) StorageType(org.ovirt.engine.core.common.businessentities.storage.StorageType) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) DiskStorageType(org.ovirt.engine.core.common.businessentities.storage.DiskStorageType) Predicate(java.util.function.Predicate) Collection(java.util.Collection) UICommand(org.ovirt.engine.ui.uicommonweb.UICommand) ListModel(org.ovirt.engine.ui.uicommonweb.models.ListModel) I18NNameValidation(org.ovirt.engine.ui.uicommonweb.validation.I18NNameValidation) BusinessEntitiesDefinitions(org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions) VolumeType(org.ovirt.engine.core.common.businessentities.storage.VolumeType) Collectors(java.util.stream.Collectors) List(java.util.List) VDSStatus(org.ovirt.engine.core.common.businessentities.VDSStatus) DiskInterface(org.ovirt.engine.core.common.businessentities.storage.DiskInterface) LengthValidation(org.ovirt.engine.ui.uicommonweb.validation.LengthValidation) StorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel) NotEmptyQuotaValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyQuotaValidation) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) QueryType(org.ovirt.engine.core.common.queries.QueryType) Guid(org.ovirt.engine.core.compat.Guid) IFrontendActionAsyncCallback(org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback) StorageDomain(org.ovirt.engine.core.common.businessentities.StorageDomain) HelpTag(org.ovirt.engine.ui.uicommonweb.help.HelpTag) StorageDomainStatus(org.ovirt.engine.core.common.businessentities.StorageDomainStatus) DiskImage(org.ovirt.engine.core.common.businessentities.storage.DiskImage) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) ConfirmationModel(org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel) ArrayList(java.util.ArrayList) Frontend(org.ovirt.engine.ui.frontend.Frontend) NameableComparator(org.ovirt.engine.core.common.businessentities.comparators.NameableComparator) CinderVolumeType(org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType) SanStorageModelBase(org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModelBase) Linq(org.ovirt.engine.ui.uicommonweb.Linq) DiskProfile(org.ovirt.engine.core.common.businessentities.profiles.DiskProfile) IValidation(org.ovirt.engine.ui.uicommonweb.validation.IValidation) Disk(org.ovirt.engine.core.common.businessentities.storage.Disk) Quota(org.ovirt.engine.core.common.businessentities.Quota) VM(org.ovirt.engine.core.common.businessentities.VM) ScsiGenericIO(org.ovirt.engine.core.common.businessentities.storage.ScsiGenericIO) UIConstants(org.ovirt.engine.ui.uicompat.UIConstants) ActionGroup(org.ovirt.engine.core.common.businessentities.ActionGroup) Collections(java.util.Collections) VDS(org.ovirt.engine.core.common.businessentities.VDS) VMStatus(org.ovirt.engine.core.common.businessentities.VMStatus) CinderVolumeType(org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType) StorageDomain(org.ovirt.engine.core.common.businessentities.StorageDomain) List(java.util.List) ArrayList(java.util.ArrayList)

Aggregations

CinderVolumeType (org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType)6 ArrayList (java.util.ArrayList)2 List (java.util.List)2 CinderDisk (org.ovirt.engine.core.common.businessentities.storage.CinderDisk)2 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)2 QueryType (org.ovirt.engine.core.common.queries.QueryType)2 Guid (org.ovirt.engine.core.compat.Guid)2 VolumeType (com.woorea.openstack.cinder.model.VolumeType)1 VolumeTypes (com.woorea.openstack.cinder.model.VolumeTypes)1 Arrays (java.util.Arrays)1 Collection (java.util.Collection)1 Collections (java.util.Collections)1 Predicate (java.util.function.Predicate)1 Collectors (java.util.stream.Collectors)1 OpenStackVolumeProvider (org.ovirt.engine.api.model.OpenStackVolumeProvider)1 OpenStackVolumeType (org.ovirt.engine.api.model.OpenStackVolumeType)1 OpenstackVolumeTypeResource (org.ovirt.engine.api.resource.openstack.OpenstackVolumeTypeResource)1 AbstractBackendActionableResource (org.ovirt.engine.api.restapi.resource.AbstractBackendActionableResource)1 ValidationResult (org.ovirt.engine.core.bll.ValidationResult)1 OpenStackVolumeProviderProxy (org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy)1