Ejemplo n.º 1
0
def _is_explicit_defined_default_class(dev):
    """
    A default class is defined explicitly when a non-vlan network has hostQos
    definitions.
    """
    netinfo = NetInfo(cache_get())
    for _, attrs in netinfo.networks:
        if 'vlan' not in attrs and 'hostQos' in attrs and (
           attrs['iface'] == dev):
            return True

    return False
Ejemplo n.º 2
0
Archivo: qos.py Proyecto: rexhsu/vdsm
def _is_explicit_defined_default_class(dev):
    """
    A default class is defined explicitly when a non-vlan network has hostQos
    definitions.
    """
    netinfo = NetInfo(cache_get())
    for attrs in six.itervalues(netinfo.networks):
        if 'vlan' not in attrs and 'hostQos' in attrs and (
           attrs['iface'] == dev):
            return True

    return False
Ejemplo n.º 3
0
def _is_explicit_defined_default_class(dev):
    """
    A default class is defined explicitly when a non-vlan network has hostQos
    definitions.
    """
    netinfo = NetInfo(cache_get())
    for attrs in six.viewvalues(netinfo.networks):
        if 'vlan' not in attrs and 'hostQos' in attrs:
            ports = attrs['ports'] if attrs['bridged'] else [attrs['iface']]
            if dev in ports:
                return True

    return False
Ejemplo n.º 4
0
Archivo: qos.py Proyecto: nirs/vdsm
def _is_explicit_defined_default_class(dev):
    """
    A default class is defined explicitly when a non-vlan network has hostQos
    definitions.
    """
    netinfo = NetInfo(cache_get())
    for attrs in six.viewvalues(netinfo.networks):
        if 'vlan' not in attrs and 'hostQos' in attrs:
            ports = attrs['ports'] if attrs['bridged'] else [attrs['iface']]
            if dev in ports:
                return True

    return False