use of org.ovirt.engine.core.common.queries.QosQueryParameterBase in project ovirt-engine by oVirt.
the class AbstractBackendCpuProfilesResource method handleQosDataCenterLinks.
/**
* used to set qos's href (requires dc id).
*/
private void handleQosDataCenterLinks(Map<Guid, Qos> qosMap) {
if (!qosMap.isEmpty()) {
List<CpuQos> list = getBackendCollection(CpuQos.class, QueryType.GetAllQosByType, new QosQueryParameterBase(null, QosType.CPU));
for (CpuQos cpuQos : list) {
Qos qos = qosMap.get(cpuQos.getId());
if (qos != null) {
qos.setDataCenter(new DataCenter());
qos.getDataCenter().setId(cpuQos.getStoragePoolId().toString());
}
}
}
}
use of org.ovirt.engine.core.common.queries.QosQueryParameterBase in project ovirt-engine by oVirt.
the class AbstractBackendDiskProfilesResource method handleQosDataCenterLinks.
/**
* used to set qos's href (requires dc id).
*/
private void handleQosDataCenterLinks(Map<Guid, Qos> qosMap) {
if (!qosMap.isEmpty()) {
List<StorageQos> list = getBackendCollection(StorageQos.class, QueryType.GetAllQosByType, new QosQueryParameterBase(null, QosType.STORAGE));
for (StorageQos storageQos : list) {
Qos qos = qosMap.get(storageQos.getId());
if (qos != null) {
qos.setDataCenter(new DataCenter());
qos.getDataCenter().setId(storageQos.getStoragePoolId().toString());
}
}
}
}
use of org.ovirt.engine.core.common.queries.QosQueryParameterBase in project ovirt-engine by oVirt.
the class AbstractBackendVnicProfilesResource method handleQosDataCenterLinks.
/**
* used to set qos's href (requires dc id).
*/
private void handleQosDataCenterLinks(Map<Guid, Qos> qosMap) {
if (!qosMap.isEmpty()) {
List<NetworkQoS> list = getBackendCollection(NetworkQoS.class, QueryType.GetAllQosByType, new QosQueryParameterBase(null, QosType.NETWORK));
for (NetworkQoS networkQoS : list) {
Qos qos = qosMap.get(networkQoS.getId());
if (qos != null) {
qos.setDataCenter(new DataCenter());
qos.getDataCenter().setId(networkQoS.getStoragePoolId().toString());
}
}
}
}
use of org.ovirt.engine.core.common.queries.QosQueryParameterBase in project ovirt-engine by oVirt.
the class AsyncDataProvider method getAllHostNetworkQos.
public void getAllHostNetworkQos(Guid dcId, AsyncQuery<List<HostNetworkQos>> query) {
query.converterCallback = new ListConverter<HostNetworkQos>() {
@Override
public List<HostNetworkQos> convert(List<HostNetworkQos> returnValue) {
List<HostNetworkQos> qosList = super.convert(returnValue);
qosList.add(0, NetworkModel.EMPTY_HOST_NETWORK_QOS);
return qosList;
}
};
Frontend.getInstance().runQuery(QueryType.GetAllQosByStoragePoolIdAndType, new QosQueryParameterBase(dcId, QosType.HOSTNETWORK), query);
}
use of org.ovirt.engine.core.common.queries.QosQueryParameterBase in project ovirt-engine by oVirt.
the class DataCenterQosListModel method syncSearch.
@Override
protected void syncSearch() {
if (getEntity() == null) {
return;
}
IdQueryParameters parameters = new QosQueryParameterBase(getEntity().getId(), getQosType());
parameters.setRefresh(getIsQueryFirstTime());
Frontend.getInstance().runQuery(QueryType.GetAllQosByStoragePoolIdAndType, parameters, new SetItemsAsyncQuery());
}
Aggregations