-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regex used to validate device hostname is not strict enough #32
Comments
Hi Cisco is currently on Christmas shutdown - expect most team members to return by Jan 6. @difuhu fyi |
Hi @sogloarcadius , Could you share your testbed.yaml and/or detail attributes of Device("vrouter1")? Thanks. |
Hello @difuhu Below the pyats version installed :
Below the Python code i use to run the test
Thanks. |
Hi @sogloarcadius , Thanks for the detail info and code snippet. Yes, enhancement can be made to validate hostname stricter. |
Hello @difuhu I am using a cisco CSR1000v for testing (iosxe) but i think your fix should target all supported devices by the library. Regards Arcadius |
Hi @sogloarcadius , |
@sogloarcadius could you please validate if this was fixed in v20.1 release? |
Update: This request is tracked on our backlog but has not yet been released. |
Hi Sogloarcadius, We currently run on v20.9, could you please upgrade your env to the latest version (better to install a fresh one) and retry? Installation steps; If the issue persists, please provide the reproduce steps and we will get back to you with a solution. I have tried with the most recent version and the issue is not reproducible;
Thanks, |
Hello, The issue is not fixed in the latest release. As described in the issue when the configured hostname contains the string subset, the validation process with learn_hostname = False does not work. Example: router is configured with hostname Thanks, Regards, Arcadius. |
Hi Arcadius, Thanks for reporting the issue, item has been added to our backlog and we will address it in the coming releases. Thanks, |
Hello,
I am using pyats and genie connection client in a python script to parse some commands output of network devices.
I realize that the regex used to validate the device hostname is not strict enough.
In fact when the actual device hostname contains a substring of the hostname parameter the connection succeed but i am expecting it to fail.
For example when the actual device hostname is "demo-vrouter1" and i use
con = Device("vrouter1").connect()
, I am expecting the connection to fail becausevrouter1
does not strictly matchdemo-vrouter1
.Do i miss a configuraton option to make hostname validation more strict ?
Thanks,
Best regards,
The text was updated successfully, but these errors were encountered: