mirror of
https://github.com/NeoCloud/NeoNetwork
synced 2024-11-25 07:20:41 +08:00
roa.py: wrong order
This commit is contained in:
parent
7ea0ae34f0
commit
9041442a03
1 changed files with 2 additions and 2 deletions
|
@ -340,14 +340,14 @@ def make_summary():
|
||||||
print(prefix)
|
print(prefix)
|
||||||
print("```")
|
print("```")
|
||||||
IP_VRSIONS = {4, 6}
|
IP_VRSIONS = {4, 6}
|
||||||
used_ip_count = {ver: sum([ip_network(str(prefix)).num_addresses for prefix in prefixes if prefix.version == ver]) for ver in IP_VRSIONS}
|
|
||||||
total_ip_count = {ver: sum([prefix.num_addresses for prefix in NEO_NETWORK_POOL if prefix.version == ver]) for ver in IP_VRSIONS}
|
total_ip_count = {ver: sum([prefix.num_addresses for prefix in NEO_NETWORK_POOL if prefix.version == ver]) for ver in IP_VRSIONS}
|
||||||
|
used_ip_count = {ver: sum([ip_network(str(prefix)).num_addresses for prefix in prefixes if prefix.version == ver]) for ver in IP_VRSIONS}
|
||||||
print()
|
print()
|
||||||
print("## Address Space Usage")
|
print("## Address Space Usage")
|
||||||
print()
|
print()
|
||||||
address_space_usage_table = tabulate(
|
address_space_usage_table = tabulate(
|
||||||
(
|
(
|
||||||
(f"IPv{ver}", f"{(u:=used_ip_count.get(ver)):.5g}", f"{(t:=total_ip_count.get(ver)):.5g}", f"{t-u:.5g}", f"{u/t*100:.2f}%", f"{(t-u)/t*100:.2f}%")
|
(f"IPv{ver}", f"{(t:=total_ip_count.get(ver)):.5g}", f"{(u:=used_ip_count.get(ver)):.5g}", f"{t-u:.5g}", f"{u/t*100:.2f}%", f"{(t-u)/t*100:.2f}%")
|
||||||
for ver in IP_VRSIONS
|
for ver in IP_VRSIONS
|
||||||
),
|
),
|
||||||
headers=["IP Version", "Total", "Used", "Free", "Percent Used", "Percent Free"],
|
headers=["IP Version", "Total", "Used", "Free", "Percent Used", "Percent Free"],
|
||||||
|
|
Loading…
Reference in a new issue