Switching to updated external network list API function

master
Sergey Shubin svs1370 5 years ago
parent 53fa24fc8d
commit bdb4eab9d7

@ -878,11 +878,8 @@ class DecortController(object):
# match by IP address range # match by IP address range
# if iface['ipAddress'] <-> erunner['name'] # if iface['ipAddress'] <-> erunner['name']
# enet_iface_list.append(erunner['id']) # enet_iface_list.append(erunner['id'])
ip_extnet = netaddr.IPNetwork(erunner['ip']) ip_extnet = netaddr.IPNetwork(erunner['ipcidr'])
if ip_addr.value < ip_extnet.first or ip_addr.value > ip_extnet.last: if ip_addr.value >= ip_extnet.first and ip_addr.value <= ip_extnet.last:
# out of net range
continue
else:
iface_data = dict(id=erunner['id'], iface_data = dict(id=erunner['id'],
ipAddress=iface['ipAddress'], ipAddress=iface['ipAddress'],
mac=iface['mac']) mac=iface['mac'])

Loading…
Cancel
Save