-
Notifications
You must be signed in to change notification settings - Fork 50
Extend nxapi client with https support #605
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
Conversation
|
@Thomas-Franklin Thanks for getting this PR open. I will review today. |
|
@Thomas-Franklin I would like to add a set of minitests to cover the following scenarios. Specifically the following scenarios.
I was thinking something along the lines of |
CHANGELOG.md
Outdated
| * `verify_mode` controls the OpenSSL session verification, | ||
| - 'none' for `OpenSSL::SSL::VERIFY_NONE` | ||
| - 'peer' for `OpenSSL::SSL::VERIFY_PEER` | ||
| - 'client-once' for `OpenSSL::SSL::VERIFY_CLIENT_ONCE` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Thomas-Franklin Did have a chance to test/verify these different modes? I only used OpenSSL::SSL::VERIFY_NONE. We need to make sure and test all of the modes before claming support for each.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I have not been able too, will try and do further testing tomorrow and see if I can test the alternative modes and add the minitests suggested as part of this PR
| self.class.password | ||
| end | ||
|
|
||
| def self.telnet_port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you exposing a telnet port? Are you using a non-default port in your test environment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I am using non-default in my local test environment
For the requested tests just wondering what you would expect to be covered in Then any test could be ran with the |
@Thomas-Franklin Correct. I suppose you are right. I was envisioning a simple test that uses ospf as an example and cycles through the various transports but it probably makes more sense to just add this to our CI environment and test one of the suites against the different options from canned environments. |
* `transport` will control if `use_ssl` is true or not * `verify_mode` has been added for when https mode is used, it selects based on `verify_mode` param being set to either 'none', 'peer', 'fail-no-peer' and 'client-once' The following environment tests were used to verify https/http and host:port combinations. ``` nxapi_remote_http: host: localhost port: 7070 telnet_port: 2222 username: vagrant password: vagrant host_and_port: host: localhost:7070 telnet_port: 2222 username: vagrant password: vagrant nxapi_remote_https: host: localhost telnet_port: 2222 transport: https port: 4431 transport: https username: vagrant password: vagrant ```
6a2fc9e to
bca8772
Compare
transportwill control ifuse_sslis true or notverify_modehas been added for when https mode is used, it selects based onverify_modeparam being set to either 'none', 'peer', 'fail-no-peer' and 'client-once'The following environment tests were used to verify https/http and host:port combinations.