mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Removed support for NAPALM 1.x
This commit is contained in:
@@ -263,12 +263,7 @@ class DeviceViewSet(CustomFieldModelViewSet):
|
|||||||
import napalm
|
import napalm
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise ServiceUnavailable("NAPALM is not installed. Please see the documentation for instructions.")
|
raise ServiceUnavailable("NAPALM is not installed. Please see the documentation for instructions.")
|
||||||
|
from napalm.base.exceptions import ConnectAuthError, ModuleImportError
|
||||||
# TODO: Remove support for NAPALM < 2.0
|
|
||||||
try:
|
|
||||||
from napalm.base.exceptions import ConnectAuthError, ModuleImportError
|
|
||||||
except ImportError:
|
|
||||||
from napalm_base.exceptions import ConnectAuthError, ModuleImportError
|
|
||||||
|
|
||||||
# Validate the configured driver
|
# Validate the configured driver
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user