Skip to content

Commit ef7c920

Browse files
committed
Add README and FAQ
1 parent 2e24295 commit ef7c920

File tree

2 files changed

+139
-12
lines changed

2 files changed

+139
-12
lines changed

FAQ.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
3+
# Frequenty Asked Questions
4+
5+
### Is it possible to disable the automatic creation of Device Type or Device Role ?
6+
7+
> **Yes**, Using the plugin settings, it's possible to control individually the creation of `device_role`, `device_type`, `manufacturer` & `platform`
8+
9+
```
10+
# configuration.py
11+
# If need you can override the default settings
12+
# PLUGINS_CONFIG = {
13+
# "netbox_onboarding": {
14+
# "create_platform_if_missing": True,
15+
# "create_manufacturer_if_missing": True,
16+
# "create_device_type_if_missing": True,
17+
# "create_device_role_if_missing": True,
18+
# "default_device_role": "network",
19+
# }
20+
# }
21+
```
22+
23+
### Does this plugin support the discovery and the creation of Interfaces and IP Address
24+
25+
> **No**, this plugin will only discover and create the management interface and the management IP address. Importing all interfaces and IP addresses is a much larger problem that requires more preparation. This is out of scope of this project.
26+
27+
### Does this plugin support the discovery of Stack or Virtual Chassis devices
28+
29+
> **Partially**, Multi member devices (Stack, Virtual Chassis, FW Pair) can be imported but they will be seen as a single device.
30+
31+
### Is this plugin able to automatically discover the type of my device
32+
33+
> **Yes**, This plugin is leveraging Netmiko & Napalm to attempt to automatically discover the type of OS of each device.
34+
35+
### How many device can I import at the same time
36+
37+
> **Many**, There is really not strict limitations regarding the number of devices that can be importer at the same time. The speed at which devices will be imported will depend of the number of active RQ workers.
38+
39+
### Do I need to setup a dedicated RQ Worker node ?
40+
41+
> **No**, The plugin is leveraging the existing RQ Worker infrastructure already in place in NetBox, the only requirements is to ensure the plugin it self is installed in the Worker node itself.
42+
43+

README.md

Lines changed: 96 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,117 @@
1-
# NetBox Onboaring plugin
1+
# NetBox Onboarding plugin
22

33
<!-- Build status with linky to the builds for ease of access. -->
44
[![Build Status](https://travis-ci.com/networktocode/ntc-netbox-plugin-onboarding.svg?token=29s5AiDXdkDPwzSmDpxg&branch=master)](https://travis-ci.com/networktocode/ntc-netbox-plugin-onboarding)
55

6-
<!-- TODO: https://github.com/networktocode/ntc-netbox-plugin-onboarding/issues/3
6+
A plugin for [NetBox](https://github.com/netbox-community/netbox) to easily onboard new devices.
77

8-
Improve this readme with accurate descriptions of what this does, as well as
9-
appropriate links to rendered documentation and standard sections such as:
8+
`ntc-netbox-plugin-onboarding` is leverating Netmiko, NAPALM & Django-RQ to simplify the onboarding process of a new device into NetBox down to an IP Address and a site.
9+
The goal of this plugin is not to import everything about a device into NetBox but rather to help build quickly an inventory in NetBox that is often the first step into an automation journey.
1010

1111
## Installation
1212

13+
The plugin is available as a Python package in pypi and can be installed with pip
14+
```shell
15+
pip install ntc-netbox-plugin-onboarding
16+
```
17+
18+
Once installed, the plugin need to be enabled in your `configuration.py`
19+
```python
20+
# In your configuration.py
21+
PLUGINS = ["netbox_onboarding"]
22+
23+
# If need you can override the default settings of the plugin too
24+
# PLUGINS_CONFIG = {
25+
# "netbox_onboarding": {
26+
# "create_platform_if_missing": True,
27+
# "create_manufacturer_if_missing": True,
28+
# "create_device_type_if_missing": True,
29+
# "create_device_role_if_missing": True,
30+
# "default_device_role": "network",
31+
# }
32+
# }
33+
```
34+
1335
## Usage
36+
### Preparation
1437

15-
## Contributing
38+
The work properly the plugin need to know the Site, Platform, Device Type, Device Role of each device as well as its IP primary IP address.
39+
It's recommended to create these objects in NetBox ahead of time and to provide them when you want to start the onboarding process.
40+
41+
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.
42+
> If the Platform is provided, it must contains a valid Napalm driver available to the worker in Python
43+
44+
### Onboard a new device
45+
46+
A new device can be onboarded via :
47+
- A web form
48+
- A CSV form to import multiple devices in bulk. `/plugins/onboarding/import/`
49+
- An API, `POST /plugins​/onboarding​/onboarding​/`
1650

17-
-->
51+
### Consult the status of onboarding tasks
1852

53+
The status of the onboarding process for each device is maintain is a dedicated table in NetBox and can be retrive :
54+
- Via the UI `/plugins/onboarding/`
55+
- Via the API `GET /plugins​/onboarding​/onboarding​/`
1956

57+
<ADD SCREEN SHOT HERE>
58+
59+
### API
60+
61+
The plugin comes with 4 new API endpoints to manage devices onbarding tasks
62+
63+
```shell
64+
GET /plugins​/onboarding​/onboarding​/ Check status of all onboarding tasks.
65+
POST ​ /plugins​/onboarding​/onboarding​/ Onboard a new device
66+
GET ​ /plugins​/onboarding​/onboarding​/{id}​/ Check the status of a specific onboarding task
67+
DELETE ​ /plugins​/onboarding​/onboarding​/{id}​/ Delete a specific onboarding task
2068
```
21-
invoke --list
22-
Available tasks:
2369

70+
## Contributing
71+
72+
Pull requests are welcomed and automatically built and tested against multiple version of Python and multiple version of NetBox through TravisCI.
73+
74+
The project is packaged with a light development environment based on docker-compose to help with the local development of the project and to run the tests within TravisCI.
75+
76+
The project is following Network to Code software development guideline and is leveraging:
77+
- Black, Pylint, Bandit and pydocstyle for Python format
78+
- Django unit test to ensure the plugin is working properly.
79+
80+
### CLI Helper Commands
81+
82+
The project is coming with a CLI helper based on `invoke` to help setup the development environment. The commands are listed below in 3 categories `dev environment`, `utility` and `testing`.
83+
84+
Each command can be executed with `invoke <command>`
85+
All commands support the arguments `--netbox-ver` and `--python-ver` if you want to manually the version of Python and NetBox to use. Each command also has its own help `invoke <command> --help`
86+
87+
#### Local dev environment
88+
```
2489
build Build all docker images.
25-
cli Launch a bash shell inside the running NetBox container.
26-
create-user Create a new user in django (default: admin), will prompt for password
2790
debug Start NetBox and its dependencies in debug mode.
2891
destroy Destroy all containers and volumes.
29-
makemigrations Run Make Migration in Django
30-
nbshell Launch a nbshell session.
3192
start Start NetBox and its dependencies in detached mode.
3293
stop Stop NetBox and its dependencies.
3394
```
95+
96+
#### Utility
97+
```
98+
cli Launch a bash shell inside the running NetBox container.
99+
create-user Create a new user in django (default: admin), will prompt for password.
100+
makemigrations Run Make Migration in Django.
101+
nbshell Launch a nbshell session.
102+
```
103+
#### Testing
104+
105+
```
106+
tests Run all tests for this plugin.
107+
pylint Run pylint code analysis.
108+
pydocstyle Run pydocstyle to validate docstring formatting adheres to NTC defined standards.
109+
bandit Run bandit to validate basic static code security analysis.
110+
black Run black to check that Python files adhere to its style standards.
111+
unittest Run Django unit tests for the plugin.
112+
```
113+
114+
## Questions
115+
116+
For any questions or comments, please check the [FAQ](FAQ.md) first and feel free to swing by the [Network to Code slack channel](https://networktocode.slack.com/) (channel #networktocode).
117+
Sign up [here](http://slack.networktocode.com/)

0 commit comments

Comments
 (0)