Search in sources :

Example 46 with IdQueryParameters

use of org.ovirt.engine.core.common.queries.IdQueryParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getIsGlusterVolumeSnapshotCliScheduleEnabled.

public void getIsGlusterVolumeSnapshotCliScheduleEnabled(AsyncQuery<Boolean> aQuery, Guid clusterId) {
    aQuery.converterCallback = new CastingConverter<>();
    Frontend.getInstance().runQuery(QueryType.GetGlusterVolumeSnapshotCliScheduleFlag, new IdQueryParameters(clusterId), aQuery);
}
Also used : StorageDomainsAndStoragePoolIdQueryParameters(org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters)

Example 47 with IdQueryParameters

use of org.ovirt.engine.core.common.queries.IdQueryParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getEmulatedMachinesByClusterID.

public void getEmulatedMachinesByClusterID(AsyncQuery<Set<String>> aQuery, Guid clusterId) {
    aQuery.converterCallback = source -> {
        if (source != null) {
            List<VDS> vdsList = (List<VDS>) source;
            Set<String> emulatedMachineList = new HashSet<>();
            for (VDS host : vdsList) {
                String hostSupportedMachines = host.getSupportedEmulatedMachines();
                if (!StringHelper.isNullOrEmpty(hostSupportedMachines)) {
                    // $NON-NLS-1$
                    emulatedMachineList.addAll(Arrays.asList(hostSupportedMachines.split(",")));
                }
            }
            return emulatedMachineList;
        }
        return null;
    };
    Frontend.getInstance().runQuery(QueryType.GetHostsByClusterId, new IdQueryParameters(clusterId), aQuery);
}
Also used : StorageDomainsAndStoragePoolIdQueryParameters(org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) VDS(org.ovirt.engine.core.common.businessentities.VDS) ArrayList(java.util.ArrayList) List(java.util.List) HashSet(java.util.HashSet)

Example 48 with IdQueryParameters

use of org.ovirt.engine.core.common.queries.IdQueryParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getHostArchitecture.

public void getHostArchitecture(AsyncQuery<ArchitectureType> aQuery, Guid id) {
    aQuery.converterCallback = new CastingConverter<>();
    Frontend.getInstance().runQuery(QueryType.GetHostArchitecture, new IdQueryParameters(id), aQuery);
}
Also used : StorageDomainsAndStoragePoolIdQueryParameters(org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters)

Example 49 with IdQueryParameters

use of org.ovirt.engine.core.common.queries.IdQueryParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getGlusterVolumeSnapshotsForVolume.

public void getGlusterVolumeSnapshotsForVolume(AsyncQuery<List<GlusterVolumeSnapshotEntity>> aQuery, Guid volumeId) {
    aQuery.converterCallback = new ListConverter<>();
    Frontend.getInstance().runQuery(QueryType.GetGlusterVolumeSnapshotsByVolumeId, new IdQueryParameters(volumeId), aQuery);
}
Also used : StorageDomainsAndStoragePoolIdQueryParameters(org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters)

Example 50 with IdQueryParameters

use of org.ovirt.engine.core.common.queries.IdQueryParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getAllDataCenterNetworks.

public void getAllDataCenterNetworks(AsyncQuery<List<Network>> aQuery, Guid storagePoolId) {
    aQuery.converterCallback = new ListConverter<>();
    IdQueryParameters params = new IdQueryParameters(storagePoolId);
    Frontend.getInstance().runQuery(QueryType.GetNetworksByDataCenterId, params, aQuery);
}
Also used : StorageDomainsAndStoragePoolIdQueryParameters(org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters)

Aggregations

IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)268 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)89 Guid (org.ovirt.engine.core.compat.Guid)80 ArrayList (java.util.ArrayList)68 StorageDomainsAndStoragePoolIdQueryParameters (org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters)62 QueryType (org.ovirt.engine.core.common.queries.QueryType)59 List (java.util.List)47 Frontend (org.ovirt.engine.ui.frontend.Frontend)45 VM (org.ovirt.engine.core.common.businessentities.VM)42 ConstantsManager (org.ovirt.engine.ui.uicompat.ConstantsManager)36 HelpTag (org.ovirt.engine.ui.uicommonweb.help.HelpTag)35 AsyncDataProvider (org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)26 Collection (java.util.Collection)25 UICommand (org.ovirt.engine.ui.uicommonweb.UICommand)25 SearchableListModel (org.ovirt.engine.ui.uicommonweb.models.SearchableListModel)25 Test (org.junit.Test)24 VDS (org.ovirt.engine.core.common.businessentities.VDS)24 HashMap (java.util.HashMap)22 ActionType (org.ovirt.engine.core.common.action.ActionType)21 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)19