nr_remediate
This script will create remediation configurations if necessary.
Using the hier-config library and nornir-hier-config plugin.
Module Contents
Functions
|
Read all the data from the associated YAML files inside data_input dir. |
|
Loop through inventory hosts which are MPLS enabled devices. |
|
Render device configuration using our Jinja2 Templates. |
|
Extract facts & configuration from devices with NAPALM's help. |
|
Config Remediation with hier-config. |
|
Execute our Nornir runbook. |
Attributes
- nr_remediate.__author__ = 'Hugo Tinoco'
- nr_remediate.__email__ = 'hugotinoco@icloud.com'
- nr_remediate.nornir
- nr_remediate.nr
- nr_remediate.load_all_data(task)
Read all the data from the associated YAML files inside data_input dir.
Add all the variables into a data_input dictionary for the individual task.host.
- nr_remediate.generate_full_mesh_list(task)
Loop through inventory hosts which are MPLS enabled devices.
Generate a list of Loopback IP far-end addresses and add to a task_host[dict] to reference later as we deploy our full-mesh MPLS LSP Configuration.
This task 100% depends on the success of “load_all_data” task.
- nr_remediate.render_main(task)
Render device configuration using our Jinja2 Templates.
Write staged config to file for preview/debugging.
- nr_remediate.get_device_facts_config(task)
Extract facts & configuration from devices with NAPALM’s help.
- nr_remediate.configuation_remediation(task)
Config Remediation with hier-config.
- nr_remediate.main()
Execute our Nornir runbook.