Update modules/visual_route.py
This commit is contained in:
parent
a8802d6e05
commit
0804f6b22a
1 changed files with 0 additions and 1 deletions
|
|
@ -21,7 +21,6 @@ ROUTER_NAME = os.getenv('BGP_VIS_ROUTER_NAME', 'My Router')
|
||||||
def _bulk_get_as_names(asn_numbers: list[str]):
|
def _bulk_get_as_names(asn_numbers: list[str]):
|
||||||
lookup_list = [asn for asn in asn_numbers if asn not in AS_NAME_CACHE]
|
lookup_list = [asn for asn in asn_numbers if asn not in AS_NAME_CACHE]
|
||||||
if not lookup_list: return
|
if not lookup_list: return
|
||||||
print(f"Performing bulk lookup for {len(lookup_list)} AS numbers...")
|
|
||||||
query = "begin\n" + "\n".join(f"AS{asn}" for asn in lookup_list) + "\nend\n"
|
query = "begin\n" + "\n".join(f"AS{asn}" for asn in lookup_list) + "\nend\n"
|
||||||
try:
|
try:
|
||||||
with socket.create_connection(('bgp.tools', 43), timeout=10) as s:
|
with socket.create_connection(('bgp.tools', 43), timeout=10) as s:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue