This repository contains a Python package (malachite
) which, once installed, gives access to
malachite-cli command line utility (later on, in some perfect imaginary world, I'd like to code
a web app + db backend and make this package the processing core of the whole project).
Currently, this is only a PoC offering limited features:
- connect to a predefined set of network appliances and extract arp tables and list of local IPs using Napalm
- format collected data and create/enrich a data model
- use this data model for generating a 3D graph using python-igraph and ploty.
Disclaimer: The code is still far from perfect and needs much more work before it is ready. It's also not as well architectured as I'd want it to be, so you may expect further changes that will not add features but only refactor the code and make it prettier.
$ pip install .
$ malachite-cli graph configs/appliances.yaml -v -o graph.html
- Your appliances file (here
configs/appliances.yaml
) lists every network appliance which should be part of the 3D graph. The one provided in this repo fits a simple vEOS mesh that you can run with avagrant up
from the vagrant/ directory (assuming you downloaded correct vEOS and installed Vagrant) - Options and commands are documented with
malachite-cli --help
(thanks click) - The target output (-o) is a non-human readable html file generated by Plotly, which should open automatically in your default web browser after program completes.
Well, here it is (impressive, isn't it ?? :P)
Well quite a lot of things if everything goes as planned (it never does) :
- add tests and catch more exceptions/prevent potential crashes
- build a larger and more diverse virtual network and try to scale malachite
- gather more data from appliances (routing tables and pbr for instance) and graph them
- ...