mirror of
https://github.com/NeoCloud/NeoNetwork
synced 2024-12-26 03:09:23 +08:00
Regular update: 2020-07-21T02:54:26Z
This commit is contained in:
parent
cd7be216d8
commit
a93866474c
2 changed files with 10 additions and 0 deletions
|
@ -1,2 +1,3 @@
|
|||
netaddr==0.8.0
|
||||
tabulate==0.8.7
|
||||
toml==0.10.1
|
||||
|
|
|
@ -12,6 +12,7 @@ from pathlib import Path
|
|||
|
||||
import toml
|
||||
from tabulate import tabulate
|
||||
import netaddr
|
||||
|
||||
NEO_NETWORK_POOL = [ip_network("10.127.0.0/16"), ip_network("fd10:127::/32")]
|
||||
|
||||
|
@ -310,6 +311,14 @@ def make_summary():
|
|||
tablefmt="presto",
|
||||
)
|
||||
print(route_table)
|
||||
print()
|
||||
print("Unused CIDR Range:")
|
||||
prefixes = netaddr.cidr_merge(
|
||||
netaddr.IPNetwork(str(entity["supernet"] or entity["prefix"]))
|
||||
for entity in route_to_roa(asn_table)
|
||||
)
|
||||
for prefix in prefixes:
|
||||
print(prefix)
|
||||
return stream.getvalue()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue