예제 #1
0
파일: api.py 프로젝트: 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)
예제 #2
0
파일: api.py 프로젝트: 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)