Search in sources :

Example 1 with NetworkQosMapper

use of org.ovirt.engine.core.vdsbroker.vdsbroker.NetworkQosMapper in project ovirt-engine by oVirt.

the class VmInfoBuildUtils method addQosForDevice.

private void addQosForDevice(Map<String, Object> struct, VnicProfile vnicProfile) {
    Guid qosId = vnicProfile.getNetworkQosId();
    @SuppressWarnings("unchecked") Map<String, Object> specParams = (Map<String, Object>) struct.get(VdsProperties.SpecParams);
    if (specParams == null) {
        specParams = new HashMap<>();
        struct.put(VdsProperties.SpecParams, specParams);
    }
    NetworkQoS networkQoS = (qosId == null) ? new NetworkQoS() : networkQosDao.get(qosId);
    NetworkQosMapper qosMapper = new NetworkQosMapper(specParams, VdsProperties.QOS_INBOUND, VdsProperties.QOS_OUTBOUND);
    qosMapper.serialize(networkQoS);
}
Also used : NetworkQoS(org.ovirt.engine.core.common.businessentities.network.NetworkQoS) NetworkQosMapper(org.ovirt.engine.core.vdsbroker.vdsbroker.NetworkQosMapper) Guid(org.ovirt.engine.core.compat.Guid) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 NetworkQoS (org.ovirt.engine.core.common.businessentities.network.NetworkQoS)1 Guid (org.ovirt.engine.core.compat.Guid)1 NetworkQosMapper (org.ovirt.engine.core.vdsbroker.vdsbroker.NetworkQosMapper)1