use of org.ovirt.engine.core.common.queries.IdQueryParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getNextAvailableDiskAliasNameByVMId.
public void getNextAvailableDiskAliasNameByVMId(AsyncQuery<String> aQuery, Guid vmId) {
aQuery.converterCallback = new CastingConverter<>();
Frontend.getInstance().runQuery(QueryType.GetNextAvailableDiskAliasNameByVMId, new IdQueryParameters(vmId), aQuery);
}
use of org.ovirt.engine.core.common.queries.IdQueryParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getIsoDomainByDataCenterId.
public void getIsoDomainByDataCenterId(AsyncQuery<StorageDomain> aQuery, Guid dataCenterId) {
aQuery.converterCallback = source -> {
if (source != null) {
ArrayList<StorageDomain> storageDomains = (ArrayList<StorageDomain>) source;
for (StorageDomain domain : storageDomains) {
if (domain.getStorageDomainType() == StorageDomainType.ISO) {
return domain;
}
}
}
return null;
};
IdQueryParameters getIsoParams = new IdQueryParameters(dataCenterId);
Frontend.getInstance().runQuery(QueryType.GetStorageDomainsByStoragePoolId, getIsoParams, aQuery);
}
use of org.ovirt.engine.core.common.queries.IdQueryParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getVmNicList.
public void getVmNicList(AsyncQuery<List<VmNetworkInterface>> aQuery, Guid id) {
aQuery.converterCallback = new ListConverter<>();
Frontend.getInstance().runQuery(QueryType.GetVmInterfacesByVmId, new IdQueryParameters(id), aQuery);
}
use of org.ovirt.engine.core.common.queries.IdQueryParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getLabelListByEntityId.
public void getLabelListByEntityId(AsyncQuery<List<Label>> aQuery, Guid entityId) {
aQuery.converterCallback = new SortListByNameConverter<>();
Frontend.getInstance().runQuery(QueryType.GetLabelByEntityId, new IdQueryParameters(entityId), aQuery);
}
use of org.ovirt.engine.core.common.queries.IdQueryParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getClusterByServiceList.
public void getClusterByServiceList(AsyncQuery<List<Cluster>> aQuery, Guid dataCenterId, final boolean supportsVirtService, final boolean supportsGlusterService) {
aQuery.converterCallback = source -> {
if (source == null) {
return new ArrayList<>();
}
final ArrayList<Cluster> list = (ArrayList<Cluster>) source;
return getClusterByServiceList(list, supportsVirtService, supportsGlusterService);
};
Frontend.getInstance().runQuery(QueryType.GetClustersByStoragePoolId, new IdQueryParameters(dataCenterId), aQuery);
}
Aggregations