From ce98ce7d7ef439f579902839f4bd2f1859694627 Mon Sep 17 00:00:00 2001 From: Brady Lamprecht Date: Mon, 5 Mar 2018 17:56:18 -0700 Subject: [PATCH 1/2] Adding in support for NAPALM --- Dockerfile | 2 ++ netbox.env | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 289d7bb..590b1bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,8 @@ RUN apk add --no-cache \ RUN pip install \ # gunicorn is used for launching netbox gunicorn \ +# napalm is used for gathering information from network devices + napalm \ # ruamel is used in startup_scripts ruamel.yaml diff --git a/netbox.env b/netbox.env index 72bdb4a..9690b8e 100644 --- a/netbox.env +++ b/netbox.env @@ -9,7 +9,9 @@ EMAIL_USERNAME=netbox EMAIL_PASSWORD= EMAIL_TIMEOUT=5 EMAIL_FROM=netbox@bar.com -NAPALM_TIMEOUT=5 +NAPALM_USERNAME= +NAPALM_PASSWORD= +NAPALM_TIMEOUT=10 MAX_PAGE_SIZE=0 SECRET_KEY=r8OwDznj!!dci#P9ghmRfdu1Ysxm0AiPeDCQhKE+N_rClfWNj SUPERUSER_NAME=admin From f4fc1c8005be562b458bd48d8c2ea729f57a9078 Mon Sep 17 00:00:00 2001 From: Brady Lamprecht Date: Tue, 6 Mar 2018 11:28:03 -0700 Subject: [PATCH 2/2] Updating README.md to describe NAPALM settings. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index d92099d..d618589 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,16 @@ FROM ninech/netbox:$VERSION COPY startup_scripts/ /opt/netbox/startup_scripts/ COPY initializers/ /opt/netbox/initializers/ ``` +#### NAPALM Settings +Since v2.1.0, NAPALM has been tightly integrated into NetBox. To learn more about what NAPALM is and how it works, please see the documentation from the [libary itself](http://napalm.readthedocs.io/en/latest/index.html) or the documentation from [NetBox](https://netbox.readthedocs.io/en/latest/configuration/optional-settings/#napalm_username) on how it is integrated. + +To enable this functionality, simply complete the following lines in `netbox.env` (or appropriate secrets mechanism) : + +* `NAPALM_USERNAME`: A common username that can be utilized for connecting to network devices in your environment. +* `NAPALM_PASSWORD`: The password to use in combintation with the username to connect to network devices. +* `NAPALM_TIMEOUT`: A value to use for when an attempt to connect to a device will timeout if no response has been recieved. + +However, if you have no need for this functionality, leaving them blank will not hinder the performance of NetBox at all. #### LDAP enabled variant