nautobot / nornir-nautobot

Nornir inventory and plugins for Nautobot.
https://docs.nautobot.com/projects/nornir-nautobot/en/latest/
31 stars 25 forks source link

Add ability to inject configurations from a list of commands #160

Open jeffkala opened 2 months ago

jeffkala commented 2 months ago

In certain circumstances and at times with certain platforms the not all configurations are in a standard get configuration method. Two common examples are:

  1. A specific default configuration only visible in the show run all version of the configuration needs to be validated. E.g. Cisco IOS you may need to validate service pad configurations, so you might want to inject thos by running show run all | i service pad.

  2. A specific configuration is not anywhere in the configuration and the ability to inject it would be valuable. E.g. Cisco NXOS doesn't show snmp-user information in the backup. This means an additional show command needs to be run to fully replicate the full configuration.

The config injection will run additional commands that are defined on the following order or precedence.

jeffkala commented 2 months ago

Oddly enough, I don't think the original _get_tcp_port method would work with NautobotInventory would only work with NautobotORMInventory from nautobot-app-nornir. Looking into options which will allow _get_tcp_port and the new _get_config_injection in both inventory use-cases.