Vadims06 / topolograph

Topolograph.com is an online project which can visualize OSPF/ISIS topology based on LSDB output from a single network device. Then you can not only see (and check) the shortest path from source to destination, but also see the outcome from link or node failure along the path to the destination.
https://topolograph.com
MIT License
177 stars 22 forks source link

Feature: Multivendor support #37

Closed alchemyx closed 1 year ago

alchemyx commented 1 year ago

Hi,

My understanding is that you need to upload output from one particular vendor. What if you have a mix ie. Juniper and Extremes? Is it doable? I can merge multiple ABRs in one file, but what if those are different vendors?

Thanks!

Vadims06 commented 1 year ago

Hey, @alchemyx , Good point, it's valid point. I suppose that it would be much easier to implement it in rest API, do you use it?

alchemyx commented 1 year ago

Hi, I don't use the API, but I might start just for this feature, so no worries.

Vadims06 commented 1 year ago

Hi @alchemyx , I've just released v2.34 version with multi vendor support. Please check. Appreciate for your feedback.

Release notes:
If a network has multiple areas, it is needed to get LSDB output from multiple devices and save it into separate files. Example below uses two LSDB outputs saved in the lsdb_samples folder.

lsdbs_attr_ll = [] lsdb_dir = os.path.join(os.getcwd(), 'lsdb_samples') for vendor_name, protocol_name in [('Cisco', 'ospf'), ('Juniper', 'ospf')]: f_name = os.path.join(lsdb_dir, f"{vendorname}{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())

Vadims06 commented 1 year ago

Implemented in v2.34

alchemyx commented 1 year ago

Can confirm it's working beautifully, thank you!