fix exception on vms missing IP addresses
This commit is contained in:
parent
6c57e45cdd
commit
aa03c00fb1
@ -163,6 +163,9 @@ def index():
|
||||
host_network_key = f"{host_id}_{network['network_name']}"
|
||||
if host_network_key in db_vms_by_host_network:
|
||||
for vm in db_vms_by_host_network[host_network_key]:
|
||||
if 'public_ipv4' not in vm or vm['public_ipv4'] is None:
|
||||
continue
|
||||
|
||||
ip_address_int = int(ipaddress.ip_address(vm['public_ipv4']))
|
||||
if network_start_int <= ip_address_int and ip_address_int <= network_end_int:
|
||||
allocation = f"{host_id}_{network['network_name']}_{len(network['allocations'])}"
|
||||
|
Loading…
Reference in New Issue
Block a user