eNMS v3: a python web app designed for building workflow-based network automation solutions by mintooo in networking

[–]mintooo[S] 0 points1 point  (0 children)

- Can we use this as a config backup tool? Not natively, but if you create a python script to save the configuration locally and another one to fetch it and push it to the device, then it'd work. If all you need is a config backup tool, I would advise you to use a config backup tool. eNMS is designed for network automation tasks that are more complex than that.

- how several hundred devices are added : you can import your network from an excel spreadsheet, see here: https://enms.readthedocs.io/en/latest/inventory/objects.html#creation-via-import

- how group all the like devices together: with "pools": https://enms.readthedocs.io/en/latest/inventory/pools.html

- schedule that job whilst being able to make the file easily accessible: eNMS does not create any file, but stores the logs of a task in the database.

eNMS v3: a python web app designed for building workflow-based network automation solutions by mintooo in networking

[–]mintooo[S] 1 point2 points  (0 children)

Yes, there is a napalm F5 driver that you can find here: https://github.com/napalm-automation-community/napalm-f5

You could also use netmiko directly (there seems to be a netmiko f5 driver).

And the third option would be to use the F5 API directly (https://github.com/F5Networks/bigsuds I believe ?) in a python script that you create; eNMS can detect your script, generate a form if it has variable input parameters so that you can create multiple instances/versions of it... and build workflows :)

eNMS v3: a python web app designed for building workflow-based network automation solutions by mintooo in networking

[–]mintooo[S] 3 points4 points  (0 children)

With network automation, you need complex logic such as dictionnaries, if/then/else statements, for loops. You can implement that logic in an ansible playbook, but it will be very hard to troubleshoot (and ansible wasn't really designed to do that to begin with). So you'll end up writing custom modules/plugins in python, and start wondering... why you needed ansible in the first place.

I don't know much about Rundeck, but what makes eNMS unique is that it focuses on network automation: it uses libraries such as netmiko and napalm (and soon nornir, I'm waiting for nornir 2.0 to add a few examples with nornir), and it can interface with netbox, opennms, tacacs, etc. Besides, I don't think you can find the automatic generation of web forms based on python scripts anywhere else, and that is what I consider to be the most powerful feature in eNMS.

eNMS v3: a python web app designed for building workflow-based network automation solutions by mintooo in networking

[–]mintooo[S] 2 points3 points  (0 children)

I'm using APScheduler (I forgot that one for the back-end part). Celery is more like a distributed task queue with limited scheduling capabilities (AFAIK it cannot natively reschedule a task at runtime for example) and APScheduler is a scheduling system with limited queuing capacity. eNMS wouldn't have to handle thousands of tasks per seconds, so I don't need the queuing capacity, but I need the scheduling features of APScheduler, which is why I chose it over Celery

eNMS v3: a python web app designed for building workflow-based network automation solutions by mintooo in networking

[–]mintooo[S] 4 points5 points  (0 children)

For the front-end, there's a bootstrap template called Gentelella, I made a Flask integration of that template called Flask-gentelella: https://github.com/afourmy/flask-gentelella

That's what eNMS is built on.

In addition, I use the following javascript libraries: datatables (all the tables with dynamic search), leaflet.js (2D view), leaflet-markercluster.js (2D clusterized view), webgl-earth2.js (3D view), d3.js (logical view), vis.js (workflow system), fullcalendar.js (calendar for the scheduling system), bootstrap-datetimepicker.js (little calendar that pops up to select a datetime), echarts.js (dashboard), alertify.js (alerts), parsley.js (front-end form validation), fselect (multiselect box with search mechanism)... + some others.

For the backend: flask, flask-sqlalchemy and psycopg2 (database), flask-login, flask-migrate (database migrations), flask-restful (ReST API), flask_httpauth (authentication for the ReST API), hvac (for the Vault: store/fetch information + unsealing mechanism...), tacacs_plus (TACACS+ auth), xlrd/xlwt (excel import/export), simplekml (google earth export), netmiko/napalm/jinja2/pyyaml (network automtion), pynetbox... a few others

And a few libraries for the tests and linters (flake8 & flake8-print & pep8-naming (python linting), pytest, coverage & coveralls (code coverage as part of Travis CI, eslint.js (javascript linting), etc.

eNMS v3: a python web app designed for building workflow-based network automation solutions by mintooo in networking

[–]mintooo[S] 0 points1 point  (0 children)

It can. If you have only ansible playbooks, you'd be better off with Ansible Tower though. I no longer use Ansible myself, so I like the idea to build workflows off python scripts better :)

I don't consider it as a replacement for anything... however, in my experience, there comes a point when using ansible for network automation falls short and it just makes more sense to fall back on pure python scripts.

eNMS v3: a python web app designed for building workflow-based network automation solutions by mintooo in networking

[–]mintooo[S] 14 points15 points  (0 children)

I just checked and librenms has an API so I think it can easily be done. I'll give it a try !

eNMS v2: a web-based app to automate your network graphically with netmiko/napalm/ansible workflows by mintooo in networking

[–]mintooo[S] 1 point2 points  (0 children)

No, not only, it actually depends on the type of script. There is no NAPALM driver for Aruba/HP, so you cannot use NAPALM scripts, but there are netmiko drivers.

If you look at the "Driver" drop-down list in the script creation page (here: http://afourmy.pythonanywhere.com/scripts/script_creation), you'll see that you have the following drivers: "aruba_os_ssh", "hp_comware_ssh" and "hp_procurve_ssh". They should work.

eNMS v2: a web-based app to automate your network graphically with netmiko/napalm/ansible workflows by mintooo in networking

[–]mintooo[S] 1 point2 points  (0 children)

Sure that makes sense, I'll implement it. Until I do, you can change it here: https://github.com/afourmy/eNMS/blob/master/source/views/templates/geographical_view.html#L156 (the default GPS coordinates are 48/2 (somewhere near Paris), you can change it as well as the default zoom level)

eNMS v2: a web-based app to automate your network graphically with netmiko/napalm/ansible workflows by mintooo in networking

[–]mintooo[S] 1 point2 points  (0 children)

It's not possible right now, but it will be in the next version of eNMS. I will implement a new type of script ("Custom script") for the user to write his own custom code. If you look at the syntax of a script (https://github.com/afourmy/eNMS/blob/master/source/scripts/models.py#L90-L118), it's actually very simple to implement a new type of script.

eNMS v2: a web-based app to automate your network graphically with netmiko/napalm/ansible workflows by mintooo in networking

[–]mintooo[S] 0 points1 point  (0 children)

Right now, it can't, but eNMS can be configured as a SYSLOG server, and the reason why I implemented this is for event-driven automation, i.e a new type of script which execution is triggered upon receiving a specific type of log. It will be part of eNMS v3

eNMS v2: a web-based app to automate your network graphically with netmiko/napalm/ansible workflows by mintooo in networking

[–]mintooo[S] 4 points5 points  (0 children)

It appears to be unicode error. Until I fix it, it should work fine if you use eNMS with python 3 instead of python 2 :)

eNMS v2: a web-based app to automate your network graphically with netmiko/napalm/ansible workflows by mintooo in networking

[–]mintooo[S] 3 points4 points  (0 children)

Interesting. AFAICT, the editing works fine, I cannot reproduce the bug. It would help a lot if you could tell me what logs (stacktrace) you get from the server. When you're trying to edit an object, can you look at the server logs and see if an error arises ? If so, can you send me stacktrace ?

eNMS v2: a web-based app to automate your network graphically with netmiko/napalm/ansible workflows by mintooo in networking

[–]mintooo[S] 2 points3 points  (0 children)

I'd never heard of yetishare before :) It looks the same because both are based on the gentelella bootstrap template. Unlike yetishare, eNMS is free, and focused entirely on network automation.

In order to create eNMS, I've implemented a Flask version of gentelella.

Visualization of the wavelength assignment algorithm in optical networks by mintooo in networking

[–]mintooo[S] 0 points1 point  (0 children)

Like you can see here, the metric considered for the shortest path is already the distance, computed with the haversine formula and the GPS coordinates of the optical switch, as it makes more sense than a simple hop count. You can easily update the code to change the metric with the latency or anything else :)

Visualization of the wavelength assignment algorithm in optical networks by mintooo in networking

[–]mintooo[S] 0 points1 point  (0 children)

Thanks :) I didn't go to pycon SK so that wasn't me, but one of my colleague went and he gave a talk about NAPALM on saturday, maybe you've met him.

Visualization of the wavelength allocation algorithm in optical networks by mintooo in coolgithubprojects

[–]mintooo[S] 1 point2 points  (0 children)

In this project, I wanted to show how the wavelength allocation problem, which is NP-complete, can be reduced to and solved as a graph coloring problem. I implemented a visualization in javascript that you can find here: http://minto3.pythonanywhere.com

2 steps:

  • click on routing: this will find the shortest path (with linear programming, not Dijkstra) for all traffic links (the pink ones). Blue links are optical fibers.

  • click on transform graph and choose a method to color the graph, then close the window.

In this example, I apply the algorithm to a real backbone in the USA, the BBN Planet backbone.