You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-8Lines changed: 33 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,26 @@ The goal of this plugin is not to import everything about a device into NetBox b
10
10
11
11
## Installation
12
12
13
-
The plugin is available as a Python package in pypi and can be installed with pip
13
+
If using the installation pattern from the NetBox Documentation, you will need to activate the
14
+
virtual environment before installing so that you install the package into the virtual environment.
15
+
16
+
```shell
17
+
cd /opt/netbox
18
+
source venv/bin/activate
19
+
```
20
+
21
+
The plugin is available as a Python package in pypi and can be installed with pip. Once the
22
+
installation is completed, then NetBox and the NetBox worker must be restarted.
23
+
14
24
```shell
15
25
pip install ntc-netbox-plugin-onboarding
26
+
systemctl restart netbox netbox-rq
16
27
```
17
28
18
-
> The plugin is compatible with NetBox 2.8.1 and higher
19
-
29
+
> The ntc-netbox-plugin-onboarding v1.3 is compatible with NetBox 2.8
30
+
31
+
> The ntc-netbox-plugin-onboarding v2 is compatible with NetBox 2.8 and NetBox 2.9
32
+
20
33
To ensure NetBox Onboarding plugin is automatically re-installed during future upgrades, create a file named `local_requirements.txt` (if not already existing) in the NetBox root directory (alongside `requirements.txt`) and list the `ntc-netbox-plugin-onboarding` package:
21
34
22
35
```no-highlight
@@ -53,26 +66,38 @@ The plugin behavior can be controlled with the following list of settings
53
66
-`default_device_role_color` string (default FF0000), color assigned to the device role if it needs to be created.
54
67
-`default_management_interface` string (default "PLACEHOLDER"), name of the management interface that will be created, if one can't be identified on the device.
55
68
-`default_management_prefix_length` integer ( default 0), length of the prefix that will be used for the management IP address, if the IP can't be found.
69
+
-`skip_device_type_on_update` boolean (default False), If True, an existing NetBox device will not get its device type updated. If False, device type will be updated with one discovered on a device.
70
+
-`skip_manufacturer_on_update` boolean (default False), If True, an existing NetBox device will not get its manufacturer updated. If False, manufacturer will be updated with one discovered on a device.
56
71
-`platform_map` (dictionary), mapping of an **auto-detected** Netmiko platform to the **NetBox slug** name of your Platform. The dictionary should be in the format:
57
72
```python
58
73
{
59
-
<Netmiko Platform>: <NetBox Slug>
74
+
<Netmiko Platform>: <NetBox Slug>
75
+
}
76
+
```
77
+
-`onboarding_extensions_map` (dictionary), mapping of a NAPALM driver name to the loadable Python module used as an onboarding extension. The dictionary should be in the format:
78
+
```python
79
+
{
80
+
<Napalm Driver Name>: <Loadable Python Module>
60
81
}
61
82
```
83
+
-`object_match_strategy` (string), defines the method for searching models. There are
84
+
currently two strategies, strict and loose. Strict has to be a direct match, normally
85
+
using a slug. Loose allows a range of search criteria to match a single object. If multiple
86
+
objects are returned an error is raised.
62
87
63
88
## Usage
64
89
65
90
### Preparation
66
91
67
-
To work properly the plugin needs to know the Site, Platform, Device Type, Device Role of each
68
-
device as well as its primary IP address orDNS Name. It's recommended to create these objects in
69
-
NetBox ahead of time and to provide them when you want to start the onboarding process.
92
+
To properly onboard a device, the plugin needs to only know the Site as well as device's primary IP address or DNS Name.
70
93
71
94
> For DNS Name Resolution to work, the instance of NetBox must be able to resolve the name of the
72
95
> device to IP address.
73
96
97
+
Providing other attributes (`Platform`, `Device Type`, `Device Role`) is optional -ifany of these attributes is provided, plugin will use provided value for the onboarded device.
74
98
If `Platform`, `Device Type`and/or`Device Role` are not provided, the plugin will try to identify these information automatically and, based on the settings, it can create them in NetBox as needed.
75
-
> If the Platform is provided, it must contains a valid Napalm driver available to the worker in Python
99
+
> If the Platform is provided, it must point to an existing NetBox Platform. NAPALM driver of this platform will be used only if it is defined for the platform in NetBox.
100
+
> To use a preferred NAPALM driver, either define it in NetBox per platform orin the plugins settings under `platform_map`
* NetBox 2.9 support - Supported releases 2.8 and 2.9
8
+
* Onboarding extensions - Customizable onboarding process through Python modules.
9
+
* Onboarding details exposed in a device view - Date, Status, Last success and Latest task id related to the onboarded device are presented under the device view.
10
+
* Onboarding task view - Onboarding details exposed in a dedicated view, including NetBox's ChangeLog.
11
+
* Onboarding Changelog - Onboarding uses NetBox's ChangeLog to display user and changes made to the Onboarding Task object.
12
+
* Skip onboarding feature - New attribute in the OnboardingDevice model allows to skip the onboarding request on devices with disabled onboarding setting.
13
+
14
+
### Bug Fixes
15
+
16
+
* Fixed race condition in `worker.py`
17
+
* Improved logging
18
+
19
+
### Additional Changes
20
+
21
+
* Platform map now includes NAPALM drivers as defined in NetBox
22
+
* Tests have been refactored to inherit NetBox's tests
23
+
* Onboarding process will update the Device found by the IP-address lookup. In case of no existing device with onboarded IP-address is found in NetBox, onboarding might update the existing NetBox' looking up by network device's hostname.
24
+
* Onboarding will raise Exception when `create_device_type_if_missing` is set to `False` for existing Device with DeviceType mismatch (behaviour pre https://github.com/networktocode/ntc-netbox-plugin-onboarding/issues/74)
0 commit comments