networktocode / ntc-netbox-plugin-onboarding

A plugin for NetBox to easily onboard new devices.
Other
246 stars 46 forks source link

No NAPALM driver for Napalm-ros #104

Closed 9janinja closed 3 years ago

9janinja commented 3 years ago

Environment

Just got using netbox. I installed an on-boarding plugin but it does not work for mikrotik routeros routers. I get this error message.

OnboardException: fail-general: Onboarding for Platform None not supported, as it has no specified NAPALM driver

(venv) root@netbox:/opt/netbox# pip freeze napalm==2.5.0

PLUGINS = [ "netbox_onboarding"]

I went ahead to install napalm-ros module. I decided to add it as a plugin, it crashed the netbox application. Stating no napalm-ros app found.

(venv) root@netbox:/opt/netbox# pip freeze napalm==2.5.0 napalm-ros==0.8.0

(venv) root@netbox:/opt/netbox# cat local_requirements.txt napalm django-storages ntc-netbox-plugin-onboarding napalm-ros

(venv) root@netbox:/opt/netbox# pip install local_requirements.txt ERROR: Could not find a version that satisfies the requirement local_requirements.txt (from versions: none) ERROR: No matching distribution found for local_requirements.txt

PLUGINS = [ "netbox_onboarding", "napalm_ros"]

(venv) root@netbox:/opt/netbox/netbox# python3 manage.py migrate File "/opt/netbox/netbox/netbox/urls.py", line 8, in from extras.plugins.urls import plugin_admin_patterns, plugin_patterns, plugin_api_patterns File "/opt/netbox/netbox/extras/plugins/urls.py", line 24, in app = apps.get_app_config(plugin_name) File "/opt/netbox/venv/lib/python3.8/site-packages/django/apps/registry.py", line 162, in get_app_config raise LookupError(message) LookupError: No installed app with label 'napalm-ros'.

At this point netbox crashes.

mzbroch commented 3 years ago

napalm-ros is not a valid NetBox plugin and adding it as a plugin will result in NetBox's errors.

Onboarding Plugin uses Netmiko to recognize (SSH Detect) the onboarded device. As this work in majority of cases, in case Netmiko is not able to recognize Mikrotik device, you have to manually specify (override) the Platform while creating an onboarding task request. In this case: