fixing capsul creation after I broke it with the pre-allocated IP

address changes
This commit is contained in:
2021-07-11 12:18:58 -05:00
parent a2f2e744e4
commit fcbea1e29b
7 changed files with 83 additions and 43 deletions

View File

@ -54,7 +54,7 @@ def index():
if network['network_name'] in vms_by_host_and_network[host_id]:
for vm in vms_by_host_and_network[host_id][network['network_name']]:
ip_address_int = int(ipaddress.ip_address(vm['public_ipv4']))
if network_start_int < ip_address_int and ip_address_int < network_end_int:
if network_start_int <= ip_address_int and ip_address_int <= network_end_int:
allocation = f"{host_id}_{network['network_name']}_{len(network['allocations'])}"
inline_styles.append(
f"""