Giter VIP home page Giter VIP logo

nornir-apps's Introduction

Repository with examples of Nornir applications

Supporting my DEVNET-2192 Automate your Network with Nornir presentation.

To run these examples, you need an environment with IOS-XE routers. You can have any number, but at least two is recommended. You would also want to modify the inventory folder with the details for your environment (IP addresses, credentials).

On the control machine, you need to have Python 3.6+ installed (though it was tested on Python 3.7.5). Dependencies are managed with poetry. After cloning the repository, use poetry install to install dependencies. When you are running the scripts, you would want to prepend them with poetry run, for example: poetry run python scripts/gather_commands.py. Run scripts in the root of the repository.

License

It is MIT licensed. Feel free to do whatever you want with the code (including commercial use). No attribution is required.

Scripts details

  • gather_commands.py - executes some show commands and saves outputs to a file, one per each device
  • cli_configure.py - configures network devices based on Jinja2 template templates/config.j2
  • netconf_save_config.py - retrieves XML configuration via NETCONF and saves it to a file, one per each device
  • restconf_get_lldp_neighbors.py - retrieves LLDP details using OpenConfig LLDP YANG model + RESTCONF as a tranport protocol. Prints all connections on the console
  • build_network_diagram_lldp.py - retrieves LLDP details using OpenConfig LLDP YANG model + RESTCONF as a tranport protocol, then parses them, builds a graph and creates a network diagram based on that graph
  • netconf_configure.py - configures network devices using NETCONF where the data resides in YAML files. Jinja XML templates are NOT used.

nornir-apps's People

Contributors

dmfigol avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.