nr_remediate

This script will create remediation configurations if necessary.

Using the hier-config library and nornir-hier-config plugin.

Module Contents

Functions

load_all_data(task)

Read all the data from the associated YAML files inside data_input dir.

generate_full_mesh_list(task)

Loop through inventory hosts which are MPLS enabled devices.

render_main(task)

Render device configuration using our Jinja2 Templates.

get_device_facts_config(task)

Extract facts & configuration from devices with NAPALM's help.

configuation_remediation(task)

Config Remediation with hier-config.

main()

Execute our Nornir runbook.

Attributes

__author__

__email__

nornir

nr

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.