You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.
I have noticed that there is an issue with optional_args forwarded from CLI based tools (cl_napalm_test and cl_napalm_configure). I have checked it against junos driver with fresh install of napalm version 0.23.0 (tested on macOS and ubuntu 16.04). All values from optional_args are forwarded from CLI as unicode and they are used directly in drivers. It causes an issue in case of basic port parameter. Drivers (junos and arista at least) are expecting integers, so variables should be casted in CLI tools code or in drivers code.
Traceback (most recent call last):
File "/usr/local/bin/cl_napalm_configure", line 9, in
load_entry_point('napalm-base==0.23.0', 'console_scripts', 'cl_napalm_configure')()
File "/usr/local/lib/python2.7/dist-packages/napalm_base/clitools/cl_napalm_configure.py", line 59, in main
args.optional_args, args.config_file, args.dry_run))
File "/usr/local/lib/python2.7/dist-packages/napalm_base/clitools/cl_napalm_configure.py", line 32, in run
with driver(hostname, user, password, optional_args=optional_args) as device:
File "/usr/local/lib/python2.7/dist-packages/napalm_base/base.py", line 54, in __enter__
self.__raise_clean_exception(exc_info[0], exc_info[1], exc_info[2])
File "/usr/local/lib/python2.7/dist-packages/napalm_base/base.py", line 82, in __raise_clean_exception
raise exc_value
jnpr.junos.exception.ConnectError: ConnectError(host: 192.168.50.6, msg: getaddrinfo() argument 2 must be integer or string)
I am happy to fix this issue but I would like to discuss first where it should be fixed, CLI tools (probably the best way imho) or in drivers.
The text was updated successfully, but these errors were encountered:
I have noticed that there is an issue with
optional_args
forwarded from CLI based tools (cl_napalm_test
andcl_napalm_configure
). I have checked it against junos driver with fresh install of napalm version 0.23.0 (tested on macOS and ubuntu 16.04). All values fromoptional_args
are forwarded from CLI as unicode and they are used directly in drivers. It causes an issue in case of basic port parameter. Drivers (junos and arista at least) are expecting integers, so variables should be casted in CLI tools code or in drivers code.Example use of cli based tool:
and exception for this example:
I am happy to fix this issue but I would like to discuss first where it should be fixed, CLI tools (probably the best way imho) or in drivers.
The text was updated successfully, but these errors were encountered: