Add file_pull option to Cisco IOS devices#345
Merged
Conversation
Ignore the import position as Ruff is handling that.
jeffkala
approved these changes
Feb 20, 2026
gsnider2195
reviewed
Feb 20, 2026
gsnider2195
reviewed
Feb 20, 2026
gsnider2195
reviewed
Feb 20, 2026
gsnider2195
reviewed
Feb 20, 2026
gsnider2195
reviewed
Feb 20, 2026
gsnider2195
reviewed
Feb 20, 2026
gsnider2195
reviewed
Feb 20, 2026
The find command was too greedy and capturing files ignore by the pylint config in pyproject.toml. This allows pylint to use the pyproject.tom.
Not all Devices use netmiko, these changes allow other devices to also implement fix exist validation.
Comment on lines
+741
to
747
| if not self.verify_file(local_checksum, dest, file_system=file_system): | ||
| log.error( | ||
| "Host %s: Attempted file copy, but could not validate file existed after transfer %s", | ||
| self.host, | ||
| FileTransferError.default_message, | ||
| ) | ||
| raise FileTransferError |
There was a problem hiding this comment.
I'm unsure how this works nested in an if statement performing the same action. I feel like there could be a better way.
Contributor
Author
There was a problem hiding this comment.
So, I don't want the check to run twice if the file actually verified. But I do want to validate that the file was copied after the copy finishes. And sharing that, I now realize that I did not indent on the remote_file_copy. So, I am pushing a new commit to indent.
gsnider2195
reviewed
Feb 25, 2026
Co-authored-by: Gary Snider <75227981+gsnider2195@users.noreply.github.com>
…ocode/pyntc into u/smk4664/file-copy-url
gsnider2195
approved these changes
Feb 25, 2026
jeffkala
approved these changes
Feb 27, 2026
Merged
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.
This PR add the ability to have the Cisco IOS devices download the files instead of relying on copying the files to the device through scp. I am using the dataclass FilePullSpec to simplify the required arguments when downloading the files instead of copying them through scp.