Fix operations to use native_ssh instead of nx-api#387
Open
mattmiller87 wants to merge 2 commits into
Open
Conversation
4864906 to
428cfa6
Compare
428cfa6 to
b4a3f78
Compare
cacc60c to
9b5c676
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New Pull Request
I am solving a bug when running nxos_device.py. This PR accomplishes that.
It also solves a potential issue when stringing multiple methods together, where
portis the same for nx-api and netmiko. I have addedapi_portfor use in nx-api.In the process of creating
api_port, I found an issue where some commands use nx-api and others use netmiko via ssh. I have a few ideas on how to solve this; please let me know if you'd like to discuss further.Change Notes
Fixed
_build_url_copy_command_simpleto return a string.Fixed
_get_file_systemand_get_free_spaceto use native_ssh; initial intent when created.Fixed the
remote_file_copyprompts to detect needing to enter a vrf if one isn't provided.Changed nxos
__init__to acceptapi_portwhen running nx-api allowingportto be specific to netmiko.Justification
The copy command return from
_build_url_copy_command_simpleshould not be a tuple.remote_file_copymethod is using native_ssh and _get_file_systemand_get_free_space` should be using it too.nxos_device currently is a mix of nx-api and netmiko commands. To run a save, it calls nx-api. To run a remote file copy, it uses ssh.
Note: unittest changes were written with AI