Example #1
0
File: api.py Project: asasuou/vdsm
def get_lldp_info(filter):
    """
    If filter is empty, all NICs are returned. If key 'devices' in filter
    contains a list of devices, the list is restricted to this devices.
    An empty list is interpreted as no restriction.
    """
    if not filter.get('devices', []):
        # TODO handle dpdk and OVS nics
        filter['devices'] = netswitch.configurator.netinfo()['nics'].keys()
    return lldp_info.get_info(filter)
Example #2
0
File: api.py Project: oVirt/vdsm
def get_lldp_info(filter):
    """
    If filter is empty, all NICs are returned. If key 'devices' in filter
    contains a list of devices, the list is restricted to this devices.
    An empty list is interpreted as no restriction.
    """
    if not filter.get('devices', []):
        # TODO handle dpdk and OVS nics
        filter['devices'] = netswitch.configurator.netinfo()['nics'].keys()
    return lldp_info.get_info(filter)