Installing the App in Nautobot¶
Prerequisites¶
- The app is compatible with Nautobot 2.4.20 and higher.
- Databases supported: PostgreSQL, MySQL
Note
Please check the dedicated page for a full compatibility matrix and the deprecation policy.
Access Requirements¶
N/A
Install Guide¶
Note
Apps can be installed from the Python Package Index or locally. See the Nautobot documentation for more details. The pip package name for this app is nautobot-plugin-nornir.
The app is available as a Python package via PyPI and can be installed with pip:
To ensure Nautobot Plugin Nornir is automatically re-installed during future upgrades, create a file named local_requirements.txt (if not already existing) in the Nautobot root directory (alongside requirements.txt) and list the nautobot-plugin-nornir package:
Once installed, the app needs to be enabled in your Nautobot configuration. The following block of code below shows the additional configuration required to be added to your nautobot_config.py file:
- Append
"nautobot_plugin_nornir"to thePLUGINSlist. - Append the
"nautobot_plugin_nornir"dictionary to thePLUGINS_CONFIGdictionary and override any defaults.
# In your nautobot_config.py
PLUGINS = ["nautobot_plugin_nornir"]
PLUGINS_CONFIG = {
"nautobot_plugin_nornir": {
"use_config_context": {"secrets": False, "connection_options": True},
# Optionally set global connection options.
"connection_options": {
"napalm": {
"extras": {
"optional_args": {"global_delay_factor": 1},
},
},
"netmiko": {
"extras": {
"global_delay_factor": 1,
},
},
},
"nornir_settings": {
"credentials": "nautobot_plugin_nornir.plugins.credentials.env_vars.CredentialsEnvVars",
"runner": {
"plugin": "threaded",
"options": {
"num_workers": 20,
},
},
},
}
}
App Configuration¶
The plugin behavior can be controlled with the following list of settings.
| Key | Example | Default | Description |
|---|---|---|---|
| nornir_settings | {"nornir_settings": { "credentials": "cred_path"}} | N/A | The expected configuration paramters that Nornir uses, see Nornir documentation. |
| username | ntc | N/A | The username when leveraging the CredentialsSettingsVars credential provider. |
| password | password123 | N/A | The password when leveraging the CredentialsSettingsVars credential provider. |
| secret | password123 | N/A | The secret password when leveraging the CredentialsSettingsVars credential provider. |
| connection_options | N/A | {"netmiko": {"extras": {"global_delay_factor": 1}}} | Set Nornir connection options globally to be used with all connections. |
| use_config_context | {"secrets": True, "connection_options": True} | {"secrets": False, "connection_options": False} | Whether to pull Secret Access Type, and/or Connection Options from Config Context. |
| connection_secret_path | "my_plugin.newos" | Dotted expression of the dictionary path where a device secret should be stored for a given Nornir Plugin. | |
| secret_access_type | "SSH" | "GENERIC" | Type of Secret Access Type to use. Examples. "GENERIC", "CONSOLE", "GNMI", "HTTP", "NETCONF", "REST", "RESTCONF", "SNMP", "SSH" |
allowed_location_types |
["Site"] | [] | The location types you would like to be automatically grouped. |
denied_location_types |
["Region"] | [] | The location types you would like to NOT be automatically grouped. |
Note: The default value for
connection_secret_pathis "nautobot_plugin_nornir.plugins.credentials.env_vars.CredentialsEnvVars", left here to import rendering of the table.
The plugin behavior can be extended further with config context data. The plugin currently implements two options: Nornir connection options, and secrets. The supported settings are listed below.
| Key | Description |
|---|---|
| connection_options | Dictionary representation of a Nornir Plugins connection options. |
| connection_secret_path | Dotted expression of the dictionary path where a device secret should be stored for a given Nornir Plugin. |
| secret_access_type | Type of Secret Access Type to use. Examples. "GENERIC", "CONSOLE", "GNMI", "HTTP", "NETCONF", "REST", "RESTCONF", "SNMP", "SSH" |
For details on the credentials, and inventory please see their respective documentation.