mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Corrected optional arg assignment
This commit is contained in:
@ -402,7 +402,7 @@ class DeviceViewSet(CustomFieldModelViewSet):
|
|||||||
if device.platform.napalm_args is not None:
|
if device.platform.napalm_args is not None:
|
||||||
optional_args.update(device.platform.napalm_args)
|
optional_args.update(device.platform.napalm_args)
|
||||||
|
|
||||||
# Update NAPALM parameters according to the provided headers
|
# Update NAPALM parameters according to the request headers
|
||||||
for header in request.headers:
|
for header in request.headers:
|
||||||
if header[:7].lower() != 'napalm-':
|
if header[:7].lower() != 'napalm-':
|
||||||
continue
|
continue
|
||||||
@ -413,7 +413,7 @@ class DeviceViewSet(CustomFieldModelViewSet):
|
|||||||
elif key.lower() == 'password':
|
elif key.lower() == 'password':
|
||||||
password = request.headers[header]
|
password = request.headers[header]
|
||||||
elif key:
|
elif key:
|
||||||
optional_args[key.lower()] == request.headers[header]
|
optional_args[key.lower()] = request.headers[header]
|
||||||
|
|
||||||
d = driver(
|
d = driver(
|
||||||
hostname=ip_address,
|
hostname=ip_address,
|
||||||
|
Reference in New Issue
Block a user