Closed alchemyx closed 1 year ago
Hi @alchemyx ,
Definitely, I will extend such allow list shortly. Thank you.
Meanwhile I can suggest using api/graphs
method as a workaround.
In fact, I am, it's based on example you kindly provided:
#!/usr/local/bin/python3
import requests
import os
TOPOLOGRAPH_HOST="127.0.0.1"
TOPOLOGRAPH_PORT=8080
TOPOLOGRAPH_WEB_API_USERNAME_EMAIL="ospf@topolograph.com"
TOPOLOGRAPH_WEB_API_PASSWORD="ospf"
from pprint import pprint as pp
lsdbs_attr_ll = []
lsdb_dir = os.path.join(os.getcwd(), 'dc_lsdb')
for vendor_name, protocol_name in [('Extreme', 'ospf'), ('Quagga', 'ospf'), ('Juniper', 'ospf')]:
f_name = os.path.join(lsdb_dir, f"{vendor_name}_{protocol_name}.txt")
with open(f_name) as f:
lsdbs_attr_ll.append({'lsdb_output': f.read(), 'vendor_device': vendor_name, 'igp_protocol': protocol_name})
r_post = requests.post(f'http://{TOPOLOGRAPH_HOST}:{TOPOLOGRAPH_PORT}/api/graphs', auth=(TOPOLOGRAPH_WEB_API_USERNAME_EMAIL, TOPOLOGRAPH_WEB_API_PASSWORD), json=lsdbs_attr_ll, timeout=(5, 30))
pp(r_post.json())
Unless you mean somethinbg else?
Uh, I got it ;) yeah, I need to update the allow list. Will do it.
@alchemyx Adjusted allow list appropriately, just released 2.34.1 and updated latest
version. Please check
Confirmed working, thank you!
I am trying to upload LSDB from Extreme but unfortunately API doesn't like it
{'detail': "'Extreme' is not one of ['Cisco', 'Juniper', 'Quagga', 'Bird', " "'Nokia', 'Mikrotik', 'Huawei', 'Paloalto', 'Ubiquiti', " "'AlliedTelesis', 'ZTE'] - '0.vendor_device'", 'status': 400, 'title': 'Bad Request', 'type': 'about:blank'}
Which seems a bit off as I can upload it without any issues over the web interface. I think similar issue might be with Ericsson (although I have no output from such device to test).