Skip to content
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

Support discard uploaded file or loaded text function #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anas-shami
Copy link
Contributor

Support discard uploaded file or loaded text function

discard_config: delete config from the remote or just flush the candidate temp. text.

@anas-shami
Copy link
Contributor Author

@samerd please review

Copy link
Collaborator

@samerd samerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are some common code between commits.
I may have conflicts, besides, we need unit-tests

@@ -160,9 +160,9 @@ def close(self):
self._delete_file(self.backup_file)
self._netmiko_close()

def _send_command(self, command):
def _send_command(self, command, expect_string=None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was done in another commit
we'll have conflicts here.

Copy link
Contributor Author

@anas-shami anas-shami Oct 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes that what I told u about its shared code that all of them will use

I use it here
self._send_command(command, expect_string=expected_config_mode)
if u want I can replace it with
self.device.send_command(command, expect_string=expect_string) #original one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants