From 6e2691b050f0efd375ec0f12050dbf531428dcd1 Mon Sep 17 00:00:00 2001 From: Marek Zbroch Date: Fri, 15 Jan 2021 12:00:32 +0100 Subject: [PATCH] Fixes JSON in napalm optional arguments --- netbox_onboarding/onboard.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/netbox_onboarding/onboard.py b/netbox_onboarding/onboard.py index 4edd3c2..b9b430d 100644 --- a/netbox_onboarding/onboard.py +++ b/netbox_onboarding/onboard.py @@ -12,8 +12,6 @@ limitations under the License. """ -import json - from django.conf import settings from .netdev_keeper import NetdevKeeper @@ -40,9 +38,7 @@ def napalm_driver(self): def optional_args(self): """Return platform optional args.""" if self.ot.platform and self.ot.platform.napalm_args: - napalm_args = json.loads(self.ot.platform.napalm_args) - - return napalm_args + return self.ot.platform.napalm_args return {}