Code Monkey home page Code Monkey logo

nautobot-app-device-onboarding's Introduction

Nautobot Device Onboarding



A plugin for Nautobot to easily onboard new devices.

Overview

The nautobot-device-onboarding plugin is using the netmiko and NAPALM libraries to simplify the onboarding process of a new device into Nautobot down to, in many cases, an IP Address and a Location. In some cases, the user may also have to specify a specific Device Platform and Device Port.

Regardless, the Onboarding App greatly simplifies the onboarding process by allowing the user to specify a small amount of info and having the app populate a much larger amount of device data in Nautobot.

Screenshots

Device Onboarding is a Job that allows you to provide a few required pieces of information and onboard the device.

job input

Try it out!

This App is installed in the Nautobot Community Sandbox found over at demo.nautobot.com!

For a full list of all the available always-on sandbox environments, head over to the main page on networktocode.com.

Documentation

Full web-based HTML documentation for this app can be found over on the Nautobot Docs website:

Contributing to the Docs

You can find all the Markdown source for the App documentation under the docs folder in this repository. For simple edits, a Markdown capable editor is sufficient: clone the repository and edit away.

If you need to view the fully generated documentation site, you can build it with mkdocs. A container hosting the docs will be started using the invoke commands (details in the Development Environment Guide) on http://localhost:8001. As your changes are saved, the live docs will be automatically reloaded.

Any PRs with fixes or improvements are very welcome!

Questions

For any questions or comments, please check the FAQ first. Feel free to also swing by the Network to Code Slack (channel #nautobot), sign up here if you don't have an account.

nautobot-app-device-onboarding's People

Contributors

bryanculver avatar carbonarok avatar chadell avatar cmsirbu avatar dependabot[bot] avatar dgarros avatar glennmatthews avatar gsnider2195 avatar hanlinmiao avatar itdependsnetworks avatar jathanism avatar jedelman8 avatar jeffkala avatar jeremypng avatar jvanderaa avatar mzbroch avatar ndom91 avatar nniehoff avatar phillsimonds avatar ryanmerolle avatar scetron avatar shakefu avatar snaselj avatar susanhooks avatar tim-fiola avatar ubajze avatar whitej6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nautobot-app-device-onboarding's Issues

Unable to add Plugin to nautobot

Environment

  • Python version: 3.8.5
  • Nautobot version: 1.0.0b1
  • nautobot-device-onboarding version: 1.0.0

Steps to Reproduce

  1. Install Plugin as documented (either manual with pip install or via local_requirement and install.sh)
  2. restart nautobot{,-rq}
  3. Open Nautobot WebUI (receive HTTP500)

Expected Behavior

Nautobot should not explode

Observed Behavior

  • Both Services are starting - logs are clean
  • When visiting the WebUI gunicorn throws a HTTP500 and logs the following information

nautobox.log

When i remove the Plugin from PLUGINS then nautobot is working well.

Device Onboarding NAPALM credentials not working

Environment

  • Python version: x
  • Nautobot version: 1.15
  • nautobot-device-onboarding version: latest

Steps to Reproduce

  1. Use NAUTOBOT_NAPALM_USERNAME and NAUTOBOT_NAPALM_PASSWORD in the Config
  2. Try to onboard a device using the plugin
  3. Get an error

Expected Behavior

Onboard Device

Observed Behavior

Error

HTTP-based device auto-detection

Current Functionality

Onboarding auto-detection works only with SSH connections.

Proposed Functionality

Onboarding auto-detection works with SSH and HTTP/HTTPS (APIs) connections.

Use Case

Enhance support for Cisco Nexus and Arista eAPI based devices.

Device Onboarding 1.1.2 issues / questions #4001

Nautobot v1.5.13
Device Onboarding 1.1.2 ( latest relase ) ( Aug 1, 2022 )

Hello,

I have a few questions / issues related to the Device Onboarding plugin.
Your help is appreciated.

  1. Is Device Onboarding discontinued? Asking as latest release is almost one year old.

  2. Is Cisco Catalyst WLC OS support for Onboarding ( special Napalm driver ) possible somehow? Regardless of model I get the same error for anything inbetween includded Cisco AIR-CT2504-K9 - Cisco AIR-CT2504-K9 .
    OnboardException: fail-general: Onboarding for Platform cisco_wlc not supported, as it has no specified NAPALM driver

  3. How can multiple credinteals be specified for the case where on some network devices we have other set of SSH credinteals? Authentication should still be attempted with first set of credinteals; if it fails then with the second set.
    From my understanding of the code as it is now; this is not possible. Please help in clarification whether this can be possible with a minor code change.

Thank you.

Device fails to import when 2 identical model devices are imported with missing device type

Environment

  • Python version: 3.10?
  • Nautobot version: 1.5.18
  • nautobot-device-onboarding version: 1.1.2

Steps to Reproduce

This is a tricky one to reproduce

  1. Create manufacturer "Cisco"
  2. Run an onboarding job with 1 worker for 2 Cisco devices of the exact same device type (ie: ASR-1002). Note: Device Type must not already exist in Nautobot

Expected Behavior

The Device Type to be created and both devices created and assigned the correct Device Type of "ASR-1002".

Observed Behavior

The Device Type is successfully created, and one of the devices is created. The other device fails onboarding with error:
duplicate key value violates unique constraint "dcim_devicetype_manufacturer_id_model_17948c0c_uniq" DETAIL: Key (manufacturer_id, model)=(<UUID>, ASR1002-HX) already exists.

From the logs, I believe what happens is both devices are processed at the same time on the same worker but in different threads. Each device gets flagged as missing the Device Type. One creates successfully, then the 2nd one attempts to immediately afterwards, but gets an error stating it already exists (since it was JUST created, but AFTER the check to see if it already exists).

See logs below:

2023-05-08 17:31:47.072 
[2023-05-08 21:31:47,072: INFO/ForkPoolWorker-2] ASSIGN: IP address 10.0.0.4/20 to GigabitEthernet0
2023-05-08 17:31:47.072 
  ASSIGN: IP address 10.0.0.4/20 to GigabitEthernet0
2023-05-08 17:31:47.072 
21:31:47.072 INFO    rq.worker :
2023-05-08 17:31:46.993 
[2023-05-08 21:31:46,992: INFO/ForkPoolWorker-2] CREATED device: DEVICE-NAME-4
2023-05-08 17:31:46.993 
  CREATED device: DEVICE-NAME-4
2023-05-08 17:31:46.992 
21:31:46.992 INFO    rq.worker :
2023-05-08 17:31:46.914 
[2023-05-08 21:31:46,913: INFO/ForkPoolWorker-2] PLATFORM: found in Nautobot cisco_ios
2023-05-08 17:31:46.914 
  PLATFORM: found in Nautobot cisco_ios
2023-05-08 17:31:46.913 
21:31:46.913 INFO    rq.worker :
2023-05-08 17:31:46.897 
[2023-05-08 21:31:46,897: INFO/ForkPoolWorker-2] Task nautobot_device_onboarding.worker.onboard_device_worker[5555-<omitted>-abc] succeeded in 11.748201122041792s: {'ok': False}
2023-05-08 17:31:46.886 

2023-05-08 17:31:46.886 
DETAIL:  Key (manufacturer_id, model)=(1111-<omitted>-abc, ASR1002-HX) already exists.
2023-05-08 17:31:46.886 
[2023-05-08 21:31:46,886: ERROR/ForkPoolWorker-2] duplicate key value violates unique constraint "dcim_devicetype_manufacturer_id_model_17948c0c_uniq"
2023-05-08 17:31:46.886 

2023-05-08 17:31:46.886 
DETAIL:  Key (manufacturer_id, model)=(1111-<omitted>-abc, ASR1002-HX) already exists.

2023-05-08 17:31:46.886 
  duplicate key value violates unique constraint "dcim_devicetype_manufacturer_id_model_17948c0c_uniq"
2023-05-08 17:31:46.886 
21:31:46.886 ERROR   rq.worker :
2023-05-08 17:31:46.886 
[2023-05-08 21:31:46,885: ERROR/ForkPoolWorker-2] Onboarding Error - Exception
2023-05-08 17:31:46.886 
  Onboarding Error - Exception
2023-05-08 17:31:46.886 
21:31:46.885 ERROR   rq.worker :
2023-05-08 17:31:46.873 
[2023-05-08 21:31:46,873: INFO/ForkPoolWorker-2] CREATE: device-type: asr1002-hx
2023-05-08 17:31:46.873 
  CREATE: device-type: asr1002-hx
2023-05-08 17:31:46.873 
21:31:46.873 INFO    rq.worker :
2023-05-08 17:31:46.872 
[2023-05-08 21:31:46,870: INFO/ForkPoolWorker-2] CREATE: device-type: asr1002-hx
2023-05-08 17:31:46.872 
  CREATE: device-type: asr1002-hx
2023-05-08 17:31:46.871 
21:31:46.870 INFO    rq.worker :
2023-05-08 17:31:46.856 
[2023-05-08 21:31:46,855: INFO/ForkPoolWorker-2] Could not find existing Nautobot device for requested primary IP address (10.0.0.4)
2023-05-08 17:31:46.856 
  Could not find existing Nautobot device for requested primary IP address (10.0.0.4)
2023-05-08 17:31:46.856 
21:31:46.855 INFO    rq.worker :
2023-05-08 17:31:46.855 
[2023-05-08 21:31:46,854: INFO/ForkPoolWorker-2] Could not find existing Nautobot device for requested primary IP address (10.0.0.3)
2023-05-08 17:31:46.855 
  Could not find existing Nautobot device for requested primary IP address (10.0.0.3)
2023-05-08 17:31:46.855 
21:31:46.854 INFO    rq.worker :
2023-05-08 17:31:45.569 
[2023-05-08 21:31:45,569: INFO/ForkPoolWorker-2] COLLECT: device interface IPs
2023-05-08 17:31:45.569 
  COLLECT: device interface IPs
2023-05-08 17:31:45.569 
21:31:45.569 INFO    rq.worker :
2023-05-08 17:31:45.547 
[2023-05-08 21:31:45,546: INFO/ForkPoolWorker-2] COLLECT: device interface IPs
2023-05-08 17:31:45.547 
  COLLECT: device interface IPs
2023-05-08 17:31:45.547 
21:31:45.546 INFO    rq.worker :

Bump max_version to be Nautobot 2.0 compatible

Environment

  • Nautobot version: 2.0
  • nautobot-device-onboarding version: 1.1.2

To be able to install the device onboarding plugin on Nautobot 2.0, the max_version will need to be bumped.

Proposed Functionality

The max_version is bumped to be Nautobot 2.0 compatible.

Use Case

cloudvision -> nautobot indexerror: list index out of range

Environment

  • Python version: 3.10
  • Nautobot version: 1.5.7
  • nautobot_ssot_aristacv 1.4.0
  • ssot : 1.2.0

Steps to Reproduce
1.Plugins, dashboard, single source of truth
2.Cloudvision --> Nautobot
3. Debug and Dry run, Run job now

Pull data from CVP into Nautobot, or at least show me what its going to pull in.

After several logs entries showing interface details for each device-
Loading data from Nautobot
Then a failure - An exception occurred: IndexError: list index out of range

Traceback (most recent call last):
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_ssot/jobs/base.py", line 332, in run
self.sync_data()
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_ssot/jobs/base.py", line 146, in sync_data
self.load_target_adapter()
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_ssot_aristacv/jobs.py", line 123, in load_target_adapter
self.target_adapter.load()
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_ssot_aristacv/diffsync/adapters/nautobot.py", line 41, in load
version=nautobot.get_device_version(dev),
File "/opt/nautobot/lib/python3.10/site-packages/nautobot_ssot_aristacv/utils/nautobot.py", line 107, in get_device_version
version = relations["destination"][software_relation][0].source.version
File "/opt/nautobot/lib/python3.10/site-packages/django/db/models/query.py", line 318, in getitem
return qs._result_cache[0]
IndexError: list index out of range

0003_onboardingtask_label migration is not reversible

Environment

  • Python version:
  • Nautobot version: 1.5.8
  • nautobot-device-onboarding version: 1.1.2

Steps to Reproduce

  1. Install nautobot-device-onboarding app and enable it in Nautobot
  2. As preparation for uninstalling the app as no longer needed, attempt to remove its database tables by running nautobot-server migrate nautobot_device_onboarding zero

Expected Behavior

Migrations to be rolled back, resulting in the removal of all device-onboarding tables from the database.

Observed Behavior

django.db.migrations.exceptions.IrreversibleError: Operation <RunPython <function create_labels_for_existing_tasks at 0x7f88cfe0c170>> in nautobot_device_onboarding.0003_onboardingtask_label is not reversible

nautobot-server migrate fails when installing plugin

Environment

  • Python version: 3.8.10
  • Nautobot version: 3.8.10
  • nautobot-device-onboarding version: 1.1.2

Steps to Reproduce

  1. Fresh Installation of nautobot
  2. Plugin installation as described in the documentation
  3. nautobot-server migrate

Expected Behavior

Succesful migration and thus installation of the plugin

Observed Behavior

Migration fails with exception PluginNotFound

nautobot@nautobot:~$ nautobot-server migrate
Traceback (most recent call last):
  File "/opt/nautobot/.local/lib/python3.8/site-packages/nautobot/extras/plugins/utils.py", line 64, in load_plugin
    plugin = importlib.import_module(plugin_name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'nautobot-device-onboarding'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/nautobot/.local/lib/python3.8/site-packages/nautobot/core/runner/runner.py", line 116, in settings_callback
    initializer(
  File "/opt/nautobot/.local/lib/python3.8/site-packages/nautobot/core/cli.py", line 176, in _configure_settings
    load_plugins(settings)
  File "/opt/nautobot/.local/lib/python3.8/site-packages/nautobot/extras/plugins/utils.py", line 54, in load_plugins
    load_plugin(plugin_name, settings)
  File "/opt/nautobot/.local/lib/python3.8/site-packages/nautobot/extras/plugins/utils.py", line 67, in load_plugin
    raise PluginNotFound(
nautobot.extras.plugins.exceptions.PluginNotFound: Unable to import plugin nautobot-device-onboarding: Module not found. Check that the plugin module has been installed within the correct Python environment.

Integration of Network Importer

Environment

  • Nautobot version:
  • nautobot-device-onboarding version:

Proposed Functionality

Merge in functionality of Network Importer into this project.

Implementation Planning

The current state is to look to add an independent job(s) into this plugin that will handle the functionality that Network Importer was providing as an independent project. The current set up within Device Onboarding into Nautobot does an excellent job and the initiative will not change this.

  • Create Nautobot DiffSync object to handle writing of the data to Nautobot
  • Gather data from network devices in a consistent fashion, today within Network Importer data is gathered from various sources including Netmiko, NAPALM, Configuration sent to Batfish
  • Remove dependency on pyATS to be able to support onboarding of more device types. pyATS was used primarily in parsing output of show lldp/cdp neighbor output. This would put the data into a nested dictionary output. This will be swapped out with using NTC Templates and Netmiko, both standardized methods of getting command output into a structured format. For devices that have JSON output of these items, a flattener will be needed
  • More to complete the process

Use Case

Migrating to a single installed platform will ease the onboarding process and help to get to automating with the data sooner!

Documentation Updates

Environment

  • Python version: 3.8.5
  • Nautobot version: 1.0.0b2
  • nautobot-device-onboarding version: 1.0.0

Steps to Reproduce

  • Update docs based on new install docs from Nautobot

Expected Behavior

Observed Behavior

Error 'ipv4' when onboarding Juniper device

Environment

  • Python version: 3.8.3
  • Nautobot version: 1.0.2
  • nautobot-device-onboarding version: 1.0.1

Steps to Reproduce

  1. Add device to plugin
  2. fill out relevant details
  3. click submit

Device be onboarded

Unsuccessful onboarding with error 'ipv4'

Jun 03 09:39:21 nautobot nautobot-server[65484]: 23:39:21 START: onboard device
Jun 03 09:39:21 nautobot nautobot-server[65484]: 23:39:21 Getting device with IP lookup failed: Device matching query does not exist.
Jun 03 09:39:21 nautobot nautobot-server[65484]: 23:39:21 CHECK: IP x.x.x.x:22
Jun 03 09:39:21 nautobot nautobot-server[65484]: 23:39:21 COLLECT: device information x.x.x.x
Jun 03 09:39:21 nautobot nautobot-server[65484]: 23:39:21 INFO guessing device type: x.x.x.x
Jun 03 09:39:29 nautobot nautobot-server[65484]: 23:39:29 INFO guessed device type: juniper_junos
Jun 03 09:39:29 nautobot nautobot-server[65484]: 23:39:29 Guessed Netmiko Device Type: juniper_junos
Jun 03 09:39:29 nautobot nautobot-server[65484]: 23:39:29 COLLECT: device facts
Jun 03 09:39:35 nautobot nautobot-server[65484]: 23:39:35 COLLECT: device interface IPs
Jun 03 09:39:36 nautobot nautobot-server[65484]: 23:39:36 INFO: No onboarding extension defined for napalm driver junos, using default napalm driver
Jun 03 09:39:36 nautobot nautobot-server[65484]: 23:39:36 Onboarding Error - Exception
Jun 03 09:39:36 nautobot nautobot-server[65484]: 23:39:36 'ipv4'
Jun 03 09:39:36 nautobot nautobot-server[65484]: 23:39:36 default: Job OK (fe066734-bfd3-418c-a418-38dd39594d8a)
Jun 03 09:39:36 nautobot nautobot-server[65484]: 23:39:36 Result is kept for 500 seconds

Error list index out of range

Environment

  • Python version: 3.8
  • Nautobot version: 1.1.6
  • nautobot-device-onboarding version: last

Steps to Reproduce

  1. Add Aruba napalm platform
  2. Select the platform in device onboarding
  3. Add the device

Expected Behavior

Need to retrieve information from aruba device because I have a majority switch with arubaOS

Observed Behavior

Nothing, just a failed with message : List index out of range

Migrate required after installed

Environment

  • Python version: 3.8.6
  • Nautobot version: 1.0.0b1
  • nautobot-device-onboarding version: 1.0.0

Installation requires a migration, docs should be updated to reflect this.

Steps to Reproduce

  1. Install
  2. Start nautobot

Expected Behavior

Observed Behavior

Testing

Environment

  • Python version: 3.7
  • Nautobot version: 1.5.2
  • nautobot-device-onboarding version: develop branch

Steps to Reproduce

  1. Install with Nautobot 1.5.2
  2. Run invoke tests

Expected Behavior

Passing tests

Observed Behavior

`======================================================================
FAIL: test_list_objects_with_permission (nautobot_device_onboarding.tests.test_views.OnboardingTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/django/test/utils.py", line 387, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/nautobot/utilities/testing/views.py", line 711, in test_list_objects_with_permission
    self.assertIn(
AssertionError: '<a href="/plugins/device-onboarding/">Onboarding Tasks</a>' not found in '\n\n\n\n<!DOCTYPE html>\n<html lang="en">\n<head>\n    <title>Onboarding Tasks - Nautobot</title>\n    \n\n\n\n    <link rel="stylesheet"\n
<ommited>

During this PR in Nautobot: https://github.com/nautobot/nautobot/pull/2841/files#diff-3c2b9c2fd181764da3a3fbbb37c756af1a5eb1ac5b1ec1993378ccafa3a328b4R694 test_list_objects_with_permission was updated. That testing harness is inherited here and is no longer passing

Pinging @HanlinMiao for visibility.

Prometheus metrics for onboard device

Environment

  • Nautobot version: 1.5.13 (to get metrics.py support)
  • nautobot-plugin-device-onboarding version: latest

Proposed Functionality

Expose Prometheus metrics for this app. Examples:

Onboard Device Errors

At the moment there is a metric capturing the amount of devices successfully onboard with onboarding_tasks_results_counter. This could be augmented with metrics capturing when there are issues:

  • nautobot_device_onboarding_tasks_errors_total{error_code="DeviceIPLookupFailed"} 2.0

Use Case

Allow users of the platform to generate time series from their Nautobot instance. In the end this could troubleshoot and get more insight of their Nautobot platform.

Onboarding Form doesn't accept ports > 32767

Environment

  • Python version: 3.7.13
  • Nautobot version: 1.1.0
  • nautobot-device-onboarding version: 1.1.0

Steps to Reproduce

  1. create a new onboarding job
  2. For the new device, input a port number > 32767

Expected Behavior

Any valid port number should be acceptable: 0 โ‰ฅ port โ‰ค 65535

Observed Behavior

An error message is displayed on the form:

Ensure this value is less than or equal to 32767.

Arista 'eos' Device Onboarding Plugin issue

Environment

  • Python version: 3.8.10
  • Nautobot version: 1.2.5
  • nautobot-device-onboarding version: 1.1.1

All platforms onboarded like ios, csr, xrv9k, junos and nxos(nxapi) are all onboarded successfully except for Arista device. which\ getting the failed reason = fail-general and message to just = 'errors' with NO specific/detailed error exception.

Steps to Reproduce

  1. Installed the Nautobot Device Onbaording App sucessfully using this Youtube Tutorial "https://www.youtube.com/watch?v=iThUlvAvadM&t=631s".
  2. Followed the Onboarding Process using nautobot github repo "https://github.com/nautobot/nautobot-plugin-device-onboarding".
  3. Used Eve-NG lab setup and all devices are accessible.
  4. Only NXOS and EOS are needed special onboarding process base don the above mentioned Github repo where Device Platforms and transport port/s should be statically populated onto the onboarding plugin based on the open/configured API transport port/s onto the remote devices.

Expected Behavior

Onboarding status "succeeded"

Observed Behavior

All platforms onboarded like ios, csr, xrv9k, junos and nxos(nxapi) are all onboarded successfully except for Arista device. which getting the failed reason = fail-general and message to just = 'errors' with NO specific/detailed error exception.

image

Tried to used napalm via the nautobot server and got a successful API call to the arista device.

nautobot@devuser-virtual-machine:~$ napalm --vendor eos --user nautobot -p root123 -o "enable_password='root123'" \arista-sw-01 call get_facts
{
"hostname": "arista-sw-01",
"fqdn": "arista-sw-01",
"vendor": "Arista",
"model": "vEOS-lab",
"serial_number": "C52F6BABAA9608AD9828D42A4FB36867",
"os_version": "4.27.0F-24305004.4270F",
"uptime": 8273,
"interface_list": [
"Ethernet1",
"Ethernet2",
"Ethernet3",
"Ethernet4",
"Ethernet5",
"Ethernet6",
"Ethernet7",
"Ethernet8",
"Management1"
]
}

Tried arista eAPI Web interface and the eAPI transport 443 was also confirmed working.

image

by the way, I'm new to Nautobot platform, I'm just trying to ask if this is might be a bug or something I did wrong in the installation of the plugin where it affects only the Arista device onboarding. Tried also to join 'networktocode' slack channel and waiting for responses. Thanks in advance.

unable to onbord NXOS devices

Environment

  • Python version: <3.9 -->
  • Nautobot version: <v1.2.8 -->
  • nautobot-device-onboarding version:

Device should successfully onboard

getting below error

celery_worker_1 | 12:15:08.781 INFO rq.worker :
celery_worker_1 | INFO guessed device type: cisco_nxos
celery_worker_1 | [2022-04-20 12:15:08,781: INFO/ForkPoolWorker-6] INFO guessed device type: cisco_nxos
celery_worker_1 | 12:15:08.781 INFO rq.worker :
celery_worker_1 | Guessed Netmiko Device Type: cisco_nxos
celery_worker_1 | [2022-04-20 12:15:08,781: INFO/ForkPoolWorker-6] Guessed Netmiko Device Type: cisco_nxos
celery_worker_1 | 12:15:13.695 INFO rq.worker :
celery_worker_1 | COLLECT: device facts
celery_worker_1 | [2022-04-20 12:15:13,695: INFO/ForkPoolWorker-6] COLLECT: device facts
celery_worker_1 | 12:15:15.567 ERROR rq.worker :
celery_worker_1 | OnboardException: fail-general: 'str' object has no attribute 'get'
celery_worker_1 | [2022-04-20 12:15:15,567: ERROR/ForkPoolWorker-6] OnboardException: fail-general: 'str' object has no attribute 'get'

Prometheus metrics for netdev_keeper

Environment

  • Nautobot version: 1.5.13 (to get metrics.py support)
  • nautobot-plugin-device-onboarding version: latest

Proposed Functionality

Expose Prometheus metrics for this app. Examples:

Check Reachability and Netmiko calls

In modules like netdev_keeper there could be value exposing metrics regarding the amount of time check_reachability has been called or even guess_device_type has been called or returned errors:

  • nautobot_device_onboarding_reachability_ok_total 27.0
  • nautobot_device_onboarding_reachability_failed_total 3.0
  • nautobot_guess_device_type_total{guessed_device_type="cisco_xr"} 2.0
  • nautobot_guess_device_type_errors_total{error_code="NetMikoAuthenticationException"} 2.0

These are just a few examples.

Use Case

Allow users of the platform to generate time series from their Nautobot instance. In the end this could troubleshoot and get more insight of their Nautobot platform.

Invalid Choices when attempting to filter

Environment

  • Python version: 3.8
  • Nautobot version: 1.4.2
  • nautobot-device-onboarding version: 1.1.2

Steps to Reproduce

  1. Have some onboarding tasks in a finished state successful and unsuccesful/failed
  2. Attempt to filter on failed tasks
  3. View error

Expected Behavior

Filtered list based on filter criteria

Observed Behavior

Observed error that two blank choices have invalid choices:

Screen Shot 2022-11-16 at 15 36 41

Issues with Netmiko 4.x

Environment

  • Python version: 3.7
  • Nautobot version: 1.3.9
  • nautobot-device-onboarding version: 1.1.1

Even though napalm = ">=2.5.0, <4" is listed as a dependency somehow I managed to get netmiko 4 installed. This causes issues with device onboarding.

Steps to Reproduce

  1. Install Nautobot 1.3.9
  2. Install netmiko 4. (I'm not really sure what other plugin I have that brought this dependency in)
  3. Install device onboarding plugin

Expected Behavior

should work

Observed Behavior

Nautobot fails to start:

  File "/usr/local/bin/nautobot-server", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/nautobot/core/cli.py", line 61, in main
    initializer=_configure_settings,  # Called after defaults
  File "/usr/local/lib/python3.7/site-packages/nautobot/core/runner/runner.py", line 266, in run_app
    management.execute_from_command_line([runner_name, command] + command_args)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute
    django.setup()
  File "/usr/local/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.7/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/usr/local/lib/python3.7/site-packages/nautobot/extras/plugins/__init__.py", line 104, in ready
    urlpatterns = import_object(f"{self.__module__}.urls.urlpatterns")
  File "/usr/local/lib/python3.7/site-packages/nautobot/extras/plugins/utils.py", line 45, in import_object
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/local/lib/python3.7/site-packages/nautobot_device_onboarding/urls.py", line 18, in <module>
    from .views import (
  File "/usr/local/lib/python3.7/site-packages/nautobot_device_onboarding/views.py", line 21, in <module>
    from .forms import OnboardingTaskForm, OnboardingTaskFilterForm, OnboardingTaskFeedCSVForm
  File "/usr/local/lib/python3.7/site-packages/nautobot_device_onboarding/forms.py", line 24, in <module>
    from .worker import enqueue_onboarding_task
  File "/usr/local/lib/python3.7/site-packages/nautobot_device_onboarding/worker.py", line 28, in <module>
    from .onboard import OnboardingManager
  File "/usr/local/lib/python3.7/site-packages/nautobot_device_onboarding/onboard.py", line 17, in <module>
    from .netdev_keeper import NetdevKeeper
  File "/usr/local/lib/python3.7/site-packages/nautobot_device_onboarding/netdev_keeper.py", line 20, in <module>
    from napalm import get_network_driver
  File "/usr/local/lib/python3.7/site-packages/napalm/__init__.py", line 11, in <module>
    import napalm.iosxr
  File "/usr/local/lib/python3.7/site-packages/napalm/iosxr/__init__.py", line 22, in <module>
    from napalm.iosxr.iosxr import IOSXRDriver  # noqa
  File "/usr/local/lib/python3.7/site-packages/napalm/iosxr/iosxr.py", line 28, in <module>
    from napalm.pyIOSXR import IOSXR
  File "/usr/local/lib/python3.7/site-packages/napalm/pyIOSXR/__init__.py", line 26, in <module>
    from napalm.pyIOSXR.iosxr import IOSXR
  File "/usr/local/lib/python3.7/site-packages/napalm/pyIOSXR/iosxr.py", line 38, in <module>
    from netmiko.ssh_exception import NetMikoTimeoutException
ModuleNotFoundError: No module named 'netmiko.ssh_exception'

Workaround add netmiko = ^3.0.0 to your local pyproject for Nautobot.

Black test fails

Environment

  • Python version:
  • Nautobot version:
  • nautobot-device-onboarding version: develop branch

Steps to Reproduce

  1. Trigger CI

Expected Behavior

Black test should pass

Observed Behavior

Run poetry run invoke black
Traceback (most recent call last):
  File "/home/runner/.cache/pypoetry/virtualenvs/nautobot-device-onboarding-pQtf[8](https://github.com/nautobot/nautobot-plugin-device-onboarding/runs/7108360205?check_suite_focus=true#step:4:9)xuE-py3.[9](https://github.com/nautobot/nautobot-plugin-device-onboarding/runs/7108360205?check_suite_focus=true#step:4:10)/bin/black", line 5, in <module>
    from black import patched_main
  File "/home/runner/.cache/pypoetry/virtualenvs/nautobot-device-onboarding-pQtf8xuE-py3.9/lib/python3.9/site-packages/black/__init__.py", line 52, in <module>
    from typed_ast import ast3, ast27
  File "/home/runner/.cache/pypoetry/virtualenvs/nautobot-device-onboarding-pQtf8xuE-py3.9/lib/python3.9/site-packages/typed_ast/ast3.py", line 40, in <module>
    from typed_ast import _ast3
ImportError: /home/runner/.cache/pypoetry/virtualenvs/nautobot-device-onboarding-pQtf8xuE-py3.9/lib/python3.9/site-packages/typed_ast/_ast3.cpython-39-x86_64-linux-gnu.so: undefined symbol: _PyUnicode_DecodeUnicodeEscape

Two devices with same Hostname not correctly created

Environment

  • Python version: 3.9.10
  • Nautobot version:
  • nautobot-device-onboarding version: 1.2.8

Steps to Reproduce

  1. Import two device with different Management IP and two different site but with same hostname in configuration
  2. Import Both Devices

Expected Behavior

Two devices with same name created in the two different sites.

Observed Behavior

The job for the second device updated the existing one instead of creating one.

Fix Docs

Environment

  • Python version: 3.8
  • Nautobot version: x
  • nautobot-device-onboarding version: 1.6 / develo

Steps to Reproduce

  1. inv build debug from a fresh clone
  2. Docs container fails due to missing modules

Expected Behavior

Docs container builds successfully

Observed Behavior

Docs container fails with this traceback due to missing dependencies.

nautobot-device-onboarding-docs-1      | ERROR    -  Error reading page 'dev/code_reference/api.md': No module named 'mkdocstrings.handlers.python'
nautobot-device-onboarding-docs-1      | Traceback (most recent call last):
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/mkdocstrings/handlers/base.py", line 563, in get_handler
nautobot-device-onboarding-docs-1      |     module = importlib.import_module(f"mkdocstrings_handlers.{name}")
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
nautobot-device-onboarding-docs-1      |     return _bootstrap._gcd_import(name[level:], package, level)
nautobot-device-onboarding-docs-1      |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
nautobot-device-onboarding-docs-1      |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
nautobot-device-onboarding-docs-1      |   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
nautobot-device-onboarding-docs-1      |   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
nautobot-device-onboarding-docs-1      |   File "<frozen importlib._bootstrap_external>", line 843, in exec_module
nautobot-device-onboarding-docs-1      |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/mkdocstrings_handlers/python/__init__.py", line 3, in <module>
nautobot-device-onboarding-docs-1      |     from mkdocstrings_handlers.python.handler import get_handler
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/mkdocstrings_handlers/python/handler.py", line 13, in <module>
nautobot-device-onboarding-docs-1      |     from griffe.agents.extensions import load_extensions
nautobot-device-onboarding-docs-1      | ModuleNotFoundError: No module named 'griffe.agents.extensions'
nautobot-device-onboarding-docs-1      | 
nautobot-device-onboarding-docs-1      | During handling of the above exception, another exception occurred:
nautobot-device-onboarding-docs-1      | 
nautobot-device-onboarding-docs-1      | Traceback (most recent call last):
nautobot-device-onboarding-docs-1      |   File "/usr/local/bin/mkdocs", line 8, in <module>
nautobot-device-onboarding-docs-1      |     sys.exit(cli())
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1157, in __call__
nautobot-device-onboarding-docs-1      |     return self.main(*args, **kwargs)
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1078, in main
nautobot-device-onboarding-docs-1      |     rv = self.invoke(ctx)
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1688, in invoke
nautobot-device-onboarding-docs-1      |     return _process_result(sub_ctx.command.invoke(sub_ctx))
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
nautobot-device-onboarding-docs-1      |     return ctx.invoke(self.callback, **ctx.params)
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/click/core.py", line 783, in invoke
nautobot-device-onboarding-docs-1      |     return __callback(*args, **kwargs)
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/mkdocs/__main__.py", line 181, in serve_command
nautobot-device-onboarding-docs-1      |     serve.serve(dev_addr=dev_addr, livereload=livereload, watch=watch, **kwargs)
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 63, in serve
nautobot-device-onboarding-docs-1      |     config = builder()
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 58, in builder
nautobot-device-onboarding-docs-1      |     build(config, live_server=live_server, dirty=dirty)
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/mkdocs/commands/build.py", line 292, in build
nautobot-device-onboarding-docs-1      |     _populate_page(file.page, config, files, dirty)
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/mkdocs/commands/build.py", line 174, in _populate_page
nautobot-device-onboarding-docs-1      |     page.render(config, files)
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/mkdocs/structure/pages.py", line 175, in render
nautobot-device-onboarding-docs-1      |     self.content = md.convert(self.markdown)
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/markdown/core.py", line 264, in convert
nautobot-device-onboarding-docs-1      |     root = self.parser.parseDocument(self.lines).getroot()
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/markdown/blockparser.py", line 90, in parseDocument
nautobot-device-onboarding-docs-1      |     self.parseChunk(self.root, '\n'.join(lines))
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/markdown/blockparser.py", line 105, in parseChunk
nautobot-device-onboarding-docs-1      |     self.parseBlocks(parent, text.split('\n\n'))
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/markdown/blockparser.py", line 123, in parseBlocks
nautobot-device-onboarding-docs-1      |     if processor.run(parent, blocks) is not False:
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/mkdocstrings/extension.py", line 121, in run
nautobot-device-onboarding-docs-1      |     html, handler, data = self._process_block(identifier, block, heading_level)
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/mkdocstrings/extension.py", line 175, in _process_block
nautobot-device-onboarding-docs-1      |     handler = self._handlers.get_handler(handler_name, handler_config)
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/site-packages/mkdocstrings/handlers/base.py", line 565, in get_handler
nautobot-device-onboarding-docs-1      |     module = importlib.import_module(f"mkdocstrings.handlers.{name}")
nautobot-device-onboarding-docs-1      |   File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
nautobot-device-onboarding-docs-1      |     return _bootstrap._gcd_import(name[level:], package, level)
nautobot-device-onboarding-docs-1      |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
nautobot-device-onboarding-docs-1      |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
nautobot-device-onboarding-docs-1      |   File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
nautobot-device-onboarding-docs-1      | ModuleNotFoundError: No module named 'mkdocstrings.handlers.python' 

onboarding switch stacks

Environment

  • Nautobot version: 1.3.9
  • nautobot-device-onboarding version: 1.1.2

Proposed Functionality

Use Case

Use Nautobot Secret Groups

Environment

  • Nautobot version: 1.3.8
  • nautobot-device-onboarding version: 1.1.1

Proposed Functionality

This plugin should use Nautobot secret groups

Use Case

this would provide additional security as well as consistency amongst plugins

Using the Plugin with napalm and netmiko extras for Jump Host does not work

Environment

  • Python version: 3.9.10
  • Nautobot version: 1.2.8
  • nautobot-device-onboarding version: 1.1.1

Steps to Reproduce

  1. Define a ssh config file to use a jump host for ssh connection
    {
    "conn_timeout": 15,
    "ssh_config_file": "/opt/nautobot/.ssh/napalm.config"
    }

  2. Onboard a device

Expected Behavior

SSH Connection through the JUMP Host should work

Observed Behavior

SSH Connection does not work.

Celery has issues with custom exceptions imported from helpers.

Environment

  • Python version: 3.7
  • Nautobot version: 1.3.7
  • nautobot-device-onboarding version: 1.1.1

OnboardException imported from helpers.py are having issues in celery:

celery_1    |   File "/source/nautobot_device_onboarding/helpers.py", line 52, in onboarding_task_fqdn_to_ip
celery_1    |     raise OnboardException(reason="fail-dns", message=f"ERROR failed to complete DNS lookup: {ot.ip_address}")
celery_1    | nautobot_device_onboarding.exceptions.OnboardException: {}
celery_1    | [2022-07-01 06:41:19,878: ERROR/MainProcess] Task handler raised error: <MaybeEncodingError: Error sending result: ''(1, <ExceptionInfo: OnboardException({})>, None)''. R
eason: ''PicklingError("Can\'t pickle <class \'nautobot_device_onboarding.exceptions.OnboardException\'>: it\'s not the same object as nautobot_device_onboarding.exceptions.OnboardExce
ption")''.>

Celery issue: celery/celery#3586

Steps to Reproduce

  1. Run nautobot in dev mode - inv debug
  2. Go to plugin onboarding task and create a task, enter 1.1.1.1/32 (any prefix) as IP Address in the form.
  3. Run Onboarding task

Expected Behavior

Device fails, but reason is populated to the onboarding task.
image

What happened instead?

Task result remains empty as celery fails.
image

Solutions tested

It's still not clear to me why exceptions from netdev_keeper.py are working fine and only imported from helpers.py are having issues.
Changing relative exceptions to full import doesn't solve the issue.

I have tried moving 1helpers.onboarding_task_fqdn_to_ip(ot)to make itnetdev_keeper.NetdevKeeper` method and then it works fine.
See #37 draft with a fix proposed.

Device Onboarding 1.1.2 issues / questions

Nautobot v1.5.13
Device Onboarding 1.1.2 ( latest relase ) ( Aug 1, 2022 )

Hello,

I have a few questions / issues related to the Device Onboarding plugin.
Your help is appreciated.

  1. Is Device Onboarding discontinued? Asking as latest release is almost one year old.

  2. Is Cisco Catalyst WLC OS support for Onboarding ( special Napalm driver ) possible somehow? Regardless of model I get the same error for anything inbetween includded Cisco AIR-CT2504-K9 - Cisco AIR-CT2504-K9 .
    OnboardException: fail-general: Onboarding for Platform cisco_wlc not supported, as it has no specified NAPALM driver

  3. How can multiple credinteals be specified for the case where on some network devices we have other set of SSH credinteals? Authentication should still be attempted with first set of credinteals; if it fails then with the second set.
    From my understanding of the code as it is now; this is not possible. Please help in clarification whether this can be possible with a minor code change.

Thank you.

Onboarding an EOS device requires user to specify Napalm username and password in onboarding task

Environment

  • Python version: 3.8.5
  • Nautobot version: 1.0.1
  • nautobot-device-onboarding version: 1.0.1

Steps to Reproduce

  1. Populate NAPALM credentials in nautobot_config.py
# Credentials that Nautobot will uses to authenticate to devices when connecting via NAPALM.
NAPALM_USERNAME = "ntc"
NAPALM_PASSWORD = "ntc123"
  1. Start onboarding task (Plugins--> Onboarding Tasks--> Add)
  2. Populate IP address, Port=443, Platform=Arista EOS
  3. Create

Expected Behavior

Device to be successfully onboarded.

I had successfully onboarded a Junos device and a couple NXOS devices without having to specify the Napalm username/pwd in the Onboarding Task. The EOS devices use the same username/pwd, but I had to explicitly populate them in the Onboarding Task form

Observed Behavior

Failed Reason: fail-general
Message: OnboardException: fail-connect: ERROR: Error reading SSH protocol banner

Here is the nautobot-worker log for the unsuccessful attempt (not username/pwd specified in the request):

2021-05-28 17:28:12,387 INFO default: nautobot_device_onboarding.worker.onboard_device(UUID('b41bef05-4e8c-46dc-a118-93bfcd83d864'), *Credentials argument hidden*) (e2b83c4d-ad9b-40d6-86ea-4261448d3214) - rq.worker - worker - /opt/nautobot/lib/python3.8/site-packages/rq/worker.py:648
2021-05-28 17:28:12,744 INFO START: onboard device - rq.worker - worker - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/worker.py:50
2021-05-28 17:28:12,756 INFO Getting device with IP lookup failed: Device matching query does not exist. - rq.worker - worker - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/worker.py:64
2021-05-28 17:28:12,757 INFO CHECK: IP 172.18.0.24:443 - rq.worker - netdev_keeper - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/netdev_keeper.py:128
2021-05-28 17:28:12,758 INFO COLLECT: device information 172.18.0.24 - rq.worker - netdev_keeper - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/netdev_keeper.py:231
2021-05-28 17:28:12,758 INFO INFO guessing device type: 172.18.0.24 - rq.worker - netdev_keeper - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/netdev_keeper.py:164
2021-05-28 17:28:12,763 ERROR ERROR: Error reading SSH protocol banner - rq.worker - netdev_keeper - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/netdev_keeper.py:174
2021-05-28 17:28:12,763 ERROR OnboardException: fail-general: OnboardException: fail-connect: ERROR: Error reading SSH protocol banner - rq.worker - worker - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/worker.py:92
2021-05-28 17:28:12,766 INFO default: Job OK (e2b83c4d-ad9b-40d6-86ea-4261448d3214) - rq.worker - worker - /opt/nautobot/lib/python3.8/site-packages/rq/worker.py:997
2021-05-28 17:28:12,767 INFO Result is kept for 500 seconds - rq.worker - worker - /opt/nautobot/lib/python3.8/site-packages/rq/worker.py:1007

Here is the successful onboarding, where I explicitly specified the username/password for napalm:

2021-05-28 17:29:44,893 INFO default: nautobot_device_onboarding.worker.onboard_device(UUID('f360c323-e96c-420d-b8be-473a7356b87e'), *Credentials argument hidden*) (9554af3c-5622-4641-908c-3585b2534fb1) - rq.worker - worker - /opt/nautobot/lib/python3.8/site-packages/rq/worker.py:648
2021-05-28 17:29:45,251 INFO START: onboard device - rq.worker - worker - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/worker.py:50
2021-05-28 17:29:45,256 INFO Getting device with IP lookup failed: Device matching query does not exist. - rq.worker - worker - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/worker.py:64
2021-05-28 17:29:45,259 INFO CHECK: IP 172.18.0.24:443 - rq.worker - netdev_keeper - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/netdev_keeper.py:128
2021-05-28 17:29:45,260 INFO COLLECT: device information 172.18.0.24 - rq.worker - netdev_keeper - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/netdev_keeper.py:231
2021-05-28 17:29:45,367 INFO COLLECT: device facts - rq.worker - netdev_keeper - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/netdev_keeper.py:261
2021-05-28 17:29:45,478 INFO COLLECT: device interface IPs - rq.worker - netdev_keeper - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/netdev_keeper.py:264
2021-05-28 17:29:45,522 INFO INFO: No onboarding extension defined for napalm driver eos, using default napalm driver - rq.worker - netdev_keeper - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/netdev_keeper.py:285
2021-05-28 17:29:45,528 INFO Could not find existing Nautobot device for requested primary IP address (172.18.0.24) - rq.worker - nautobot_keeper - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/nautobot_keeper.py:154
2021-05-28 17:29:45,539 INFO PLATFORM: found in Nautobot arista_eos - rq.worker - nautobot_keeper - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/nautobot_keeper.py:329
2021-05-28 17:29:45,565 INFO CREATED device: eos-spine2 - rq.worker - nautobot_keeper - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/nautobot_keeper.py:412
2021-05-28 17:29:45,571 INFO FINISH: onboard device - rq.worker - worker - /opt/nautobot/lib/python3.8/site-packages/nautobot_device_onboarding/worker.py:85
2021-05-28 17:29:45,572 INFO default: Job OK (9554af3c-5622-4641-908c-3585b2534fb1) - rq.worker - worker - /opt/nautobot/lib/python3.8/site-packages/rq/worker.py:997
2021-05-28 17:29:45,572 INFO Result is kept for 500 seconds - rq.worker - worker - /opt/nautobot/lib/python3.8/site-packages/rq/worker.py:1007

Tasks do not complete on docker-compose version (with ldap)

Environment

  • Python version: 3.10.6
  • Nautobot version: 1.4.1
  • nautobot-device-onboarding version: 1.1.2

Steps to Reproduce

  1. Clone nautobot-docker-compose and adapt files for ldap as well
  2. Follow process to create the docker image, launch with docker compose up -d
  3. Create new onboarding task for networking device accessible via the nautobot containers and docker host (device config shows up in the config tab)

Expected Behavior

Onboarding task completes succesfuly, device, platform, etc added.

Observed Behavior

Onboarding task never completes. When inspecting the log this is the main error message:
nautobot-docker-celery_worker-1 | [2022-08-26 16:45:45,246: ERROR/MainProcess] Received unregistered task of type 'nautobot_device_onboarding.worker.onboard_device_worker'.
nautobot-docker-celery_worker-1 | The message has been ignored and discarded.
nautobot-docker-celery_worker-1 |
nautobot-docker-celery_worker-1 | Did you remember to import the module containing this task?
nautobot-docker-celery_worker-1 | Or maybe you're using relative imports?
nautobot-docker-celery_worker-1 |
nautobot-docker-celery_worker-1 | Please see
nautobot-docker-celery_worker-1 | http://docs.celeryq.org/en/latest/internals/protocol.html
nautobot-docker-celery_worker-1 | for more information.

Please let me know if you need more information.

Ordering of onboarding tasks in the tasks list view

Environment

  • Nautobot version: 1.0.3
  • nautobot-device-onboarding version: 1.1.0

In the onboarding tasks list view, the onboarding tasks are currently being ordered in decreasing order of the ID of the task by default. Instead, it would be easier to consume the tasks as they run when the tasks are ordered by the date/time they were created on.

Proposed Functionality

Ordering the onboarding tasks in the task list view in chronological order instead of decreasing order of task IDs

Use Case

It would be easier to follow the tasks in the list by seeing the latest task run at the top, instead of having to find the exact task(s) run by finding it in the list which is ordered in the decreasing order of the ID, which is not a field the user has any control over.

The FAQ link in the readme is incorrect

Steps to Reproduce

  1. Click on the FAQ link at the bottom of the README.
  2. View 404 page

The Device onboarding FAQ page should load

The FAQ page did not load, instead the current link directs to a docs 404 page

Thola support for onboarding process

In our organization we are using Thola to identify and read inventory data of network devices (via SNMP).
We are using the Thola REST API for it. The responses / data structures are JSON and easy to parse.

Project URL is: https://github.com/inexio/thola
It seem that is would be useful to have Thola support during the netbox (and for us the ongoing nautobot) onboarding process too.

What do you think about this feature?

Use Case

 $ thola identify 10.1.3.4
 
 Device: 
   Class: ceraos/ip10
   Properties: 
     Vendor: Ceragon
     Model: IP-10
     SerialNumber: 00:0A:25:25:77:67
     OSVersion: 2.9.25-1
 

Error migrate database

Environment

  • Python version: 3.8.16
  • Nautobot version: 2.0.0
  • nautobot-device-onboarding version: latest
  • OracleLinux 8 latest

Steps to Reproduce

  1. new install nautobot
  2. install nautobot-device-onboarding
  3. nautobot-server post_upgrade

Expected Behavior

Observed Behavior

04:30:15.901 ERROR nautobot.core.apps :
Error in link construction for Notes: Reverse for 'note_list' not found. 'note_list' is not a valid view function or pattern name.
Performing database migrations...
Traceback (most recent call last):
File "/opt/nautobot/bin/nautobot-server", line 8, in
sys.exit(main())
File "/opt/nautobot/lib64/python3.8/site-packages/nautobot/core/cli/init.py", line 54, in main
run_app(
File "/opt/nautobot/lib64/python3.8/site-packages/nautobot/core/runner/runner.py", line 297, in run_app
management.execute_from_command_line([runner_name, command] + command_args)
File "/opt/nautobot/lib64/python3.8/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/opt/nautobot/lib64/python3.8/site-packages/django/core/management/init.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/nautobot/lib64/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/nautobot/lib64/python3.8/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/opt/nautobot/lib64/python3.8/site-packages/nautobot/core/management/commands/post_upgrade.py", line 100, in handle
call_command(
File "/opt/nautobot/lib64/python3.8/site-packages/django/core/management/init.py", line 181, in call_command
return command.execute(*args, **defaults)
File "/opt/nautobot/lib64/python3.8/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/opt/nautobot/lib64/python3.8/site-packages/django/core/management/base.py", line 89, in wrapped
res = handle_func(*args, **kwargs)
File "/opt/nautobot/lib64/python3.8/site-packages/django/core/management/commands/migrate.py", line 95, in handle
executor.loader.check_consistent_history(connection)
File "/opt/nautobot/lib64/python3.8/site-packages/django/db/migrations/loader.py", line 306, in check_consistent_history
raise InconsistentMigrationHistory(
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration dcim.0028_alter_device_and_rack_role_add_new_role is applied before its dependency nautobot_device_onboarding.0001_initial on database 'default'.

Onboarding EOS device with Python 3.10 fails

Environment

  • Python version: 3.10.8
  • Nautobot version: 1.5.0
  • nautobot-device-onboarding version: 1.1.2

Steps to Reproduce

  1. In Nautobot create arista_eos platform with napalm driver eos
  2. Configure an EOS device with a management IP and enable eAPI using default https port:
interface Management1
  ip address 192.168.254.10/24

management api http-commands
  no shutdown
  1. Create and run a Device Onboarding job:
    Site: mysite
    IP Address: 192.168.254.10
    Port: 443
    Platform: arista_eos

Expected Behavior

Device added to Nautobot

Observed Behavior

Job fails with error:
Socket error during eAPI connection: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)

Additional details

This appears to be related to arista-eosplus/pyeapi#211
Which is fixed in: arista-eosplus/pyeapi#222

I confirmed the workaround in the first link resolves the issue. Specifically , I did this on my Arista switch:

management security
   ssl profile SSL_PROFILE
      tls versions 1.2
      cipher-list ECDHE-RSA-AES256-GCM-SHA384
      certificate capi.pem key capikey.pem
      trust certificate ARISTA_SIGNING_CA.crt
      trust certificate ARISTA_ROOT_CA.crt

management api http-commands
   protocol https ssl profile SSL_PROFILE
   no shutdown

Discussion (not turned on) Idea: Use Welcome Wizard when installed

Environment

  • Nautobot version: 1.1.4
  • nautobot-device-onboarding version: 1.1.1

Proposed Functionality

  1. When the Welcome Wizard Plugin is installed, use the Device Type library to search for a match on device type

Use Case

The device type library will include more interfaces, power connections, and if applicable console ports of devices. The proposed logic of sorts would be:

if device_type does not exist:
    if welcome_wizard in installed_plugins:
        Search welcome wizard device type connection for device
        if found import this device type using welcome wizard
        end if device type
    onboard device type as is today

Onboarding Aruba Switches

Environment

  • Nautobot version: 1.5.11
  • nautobot-device-onboarding version: 1.1.2

Proposed Functionality

I don't see any napalm plugins for Aruba devices, either running AOS or CX-AOS.
And I was not sure either about Cisco IOS-XE
Are there plans for these?

Fix nautobot keeper test

Environment

  • Python version: All
  • Nautobot version:
  • nautobot-device-onboarding version: 1.1.2

Steps to Reproduce

  1. Run tests

Expected Behavior

Tests to pass

Observed Behavior

Test failed. Not sure how/if it ever worked.

Onboarding Read The Docs Page has bad link to documentation

Environment

  • Python version:
  • Nautobot version:
  • nautobot-device-onboarding version:

Steps to Reproduce

  1. From " https://github.com/nautobot/nautobot-plugin-device-onboarding" click on Admin Guide you will be served a 404 response
    verified via slack channels with NTC the proper link for this hyperlink should be. "https://docs.nautobot.com/projects/device-onboarding/en/latest/admin/install/".

Expected Behavior

Served a 404 versus a proper page.

Observed Behavior

"Related Field got invalid lookup: address" error during device onboarding

Environment

  • Python version: 3.8.5
  • Nautobot version: 1.0.0b4
  • nautobot-device-onboarding version: 1.0.0

Steps to Reproduce

  1. Spin up instance of dev/test server
  2. Install Nautobot 1.0.0b4
  3. Import database or manually create a site
  4. Install device onboarding plugin 1.0.0
  5. Plugins --> Onboarding Tasks --> Add (+)
  6. Fill out form
  7. Click on Create button

Expected Behavior

Device to be successfully onboarded

Observed Behavior

Failure due to Related Field got invalid lookup: address

Log snips

==> /var/log/nautobot/nautobot.log <==
2021-04-20 22:27:44 DEBUG Form validation was successful

==> /var/log/nautobot/nautobot_worker.log <==
2021-04-20 22:27:44 INFO default: nautobot_device_onboarding.worker.onboard_device(UUID('a37e00aa-dc61-4a33-8ba6-19f77aab6659'), *Credentials argument hidden*) (69ddd347-3452-4ae2-b502-c3551b314764)

==> /var/log/nautobot/nautobot.log <==
2021-04-20 22:27:44 INFO Created onboarding task local : csr2 (PK: a37e00aa-dc61-4a33-8ba6-19f77aab6659)

==> /var/log/nautobot/nautobot_worker.log <==
2021-04-20 22:27:45 INFO START: onboard device
2021-04-20 22:27:45 ERROR Onboarding Error - Exception
2021-04-20 22:27:45 ERROR Related Field got invalid lookup: address
2021-04-20 22:27:45 INFO default: Job OK (69ddd347-3452-4ae2-b502-c3551b314764)
2021-04-20 22:27:45 INFO Result is kept for 500 seconds

Drift cookie v1

Update development environment to match the version of 1 of NTC cookiecutter

Update Docs

Environment

  • Python version: na
  • Nautobot version: na
  • nautobot-device-onboarding version: latest

Issue

Some docs are incomplete or include notes. Update docs to remove or complete notes and blank sections.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.