Skip to content

Commit a414090

Browse files
leoparenteclaude
andauthored
docs: document discovery_drivers option and custom_napalm driver support (#306)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 653ead6 commit a414090

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

docs/backends/device_discovery.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ Current supported options:
5757
| port_scan_timeout | float | TCP port probe timeout in seconds (defaults to 0.5) |
5858
| capture_running_config | bool | If True, collects the running configuration from the device and ingests it as a DeviceConfig entity (defaults to 'False' if not specified) |
5959
| capture_startup_config | bool | If True, collects the startup/saved configuration from the device and ingests it as a DeviceConfig entity (defaults to 'False' if not specified) |
60+
| sanitize_config | bool | If False, captured configuration is stored as-is without redacting sensitive values such as passwords and pre-shared keys (defaults to 'True' if not specified) |
61+
| discovery_drivers | list | Restrict auto-discovery to this ordered list of driver names (e.g. `[panos, huawei_vrp]`). Only used when a scope entry has no `driver` set. If not specified, only standard NAPALM drivers are tried. Custom drivers (`panos`, `panos_ssh`, `huawei_vrp`) must be listed explicitly to be used in auto-discovery. |
6062

6163
#### Defaults
6264
Current supported defaults:
@@ -123,7 +125,7 @@ The scope defines a list of devices that can be accessed and pulled data.
123125
| hostname | string | yes | Device hostname. It also supports subnets (e.g. 192.168.1.0/28) and IP ranges in the format 192.168.0.1-192.168.0.10 or 192.168.0.1-10. |
124126
| username | string | yes | Device username |
125127
| password | string | yes | Device username's password |
126-
| driver | string | no | If defined, try to connect to device using the specified NAPALM driver. If not, it will try all the current installed drivers |
128+
| driver | string | no | If defined, connect using the specified NAPALM driver. If not set, all installed drivers are tried (or the `discovery_drivers` list if configured). |
127129
| optional_args | map | no | NAPALM optional arguments defined [here](https://napalm.readthedocs.io/en/latest/support/#list-of-supported-optional-arguments). Commonly used: `ssh_config_file` for jumphost support (see [SSH Configuration guide](./device_discovery_ssh.md)), `canonical_int` for interface naming, `timeout` for slow connections. |
128130
| override_defaults | map | no | Allows overriding of any defaults for a specific device in the scope |
129131

@@ -206,6 +208,32 @@ orb:
206208
location: Row B
207209
```
208210
211+
### Custom Driver Discovery Example
212+
213+
Use `discovery_drivers` to limit auto-discovery to a specific set of drivers. This is useful when you know the device type in advance or when using custom NAPALM drivers shipped with device-discovery (`panos`, `panos_ssh`, `huawei_vrp`).
214+
215+
```yaml
216+
orb:
217+
...
218+
policies:
219+
device_discovery:
220+
panos_discovery:
221+
config:
222+
schedule: "0 * * * *"
223+
options:
224+
discovery_drivers:
225+
- panos
226+
- panos_ssh
227+
defaults:
228+
site: DC1
229+
scope:
230+
- hostname: 192.168.10.20
231+
username: admin
232+
password: ${PANOS_PASS}
233+
```
234+
235+
In this example, only the `panos` and `panos_ssh` drivers are tried during auto-discovery for devices in this policy. If you set `driver` explicitly on a scope entry, `discovery_drivers` is ignored for that entry.
236+
209237
### Advanced Sample
210238

211239
You can reuse credentials across multiple devices in the `scope` section by using YAML anchors (`&`) and aliases (`<<`). This reduces redundancy and simplifies configuration management.

0 commit comments

Comments
 (0)