Skip to content

Commit

Permalink
move conn options to admin
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffkala committed Dec 10, 2024
1 parent cd1b17a commit cae5444
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
24 changes: 0 additions & 24 deletions docs/dev/extending.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,3 @@ Extending the platform support for the SSoT specific jobs should be accomplished
New platform support should be simplified in this framework, by providing a YAML file.

The format of these YAML files are and how to extend this application is covered in [App YAML Overrides](../user/app_yaml_overrides.md).

### Passing Custom Nornir Connection Options

Device Onboarding 4.0 uses Netmiko as the automation engine that queries the devices for information; more specifically, nornir-netmiko. To extend the device onboarding app to pass `extras` to the connection options the following can be added to `nautobot_plugin_nornir` `PLUGIN_CONFIG`.

```python
PLUGINS_CONFIG = {
"nautobot_device_onboarding": {},
"nautobot_plugin_nornir": {
"nornir_settings": {
"... omitted ..."},
"connection_options": {
"netmiko": {
"extras": { # <==== passed into the connection setup.
"fast_cli": False,
"read_timeout_override": 30,
},
},
},
},
}
```

When the on-demand inventory is created for the `Sync Device from Network` job, the extras in the `netmiko` connection dictionary are added to the connection setup.
23 changes: 23 additions & 0 deletions docs/user/app_use_cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,29 @@ The Onboarding App will automatically create Platforms for vendor operating syst
![cisco_ios_platform](../images/platform_cisco_ios.png)
![juniper_junos_platform](../images/platform_juniper_junos.png)

### Passing Custom Nornir Connection Options

Device Onboarding 4.0 uses Netmiko as the automation engine that queries the devices for information; more specifically, nornir-netmiko. To extend the device onboarding app to pass `extras` to the connection options the following can be added to `nautobot_plugin_nornir` `PLUGIN_CONFIG`.

```python
PLUGINS_CONFIG = {
"nautobot_device_onboarding": {},
"nautobot_plugin_nornir": {
"nornir_settings": {
"... omitted ..."},
"connection_options": {
"netmiko": {
"extras": { # <==== passed into the connection setup.
"fast_cli": False,
"read_timeout_override": 30,
},
},
},
},
}
```

When the on-demand inventory is created for the `Sync Device from Network` job, the extras in the `netmiko` connection dictionary are added to the connection setup.

# Use-cases and common workflows

Expand Down

0 comments on commit cae5444

Please sign in to comment.