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

ios.commit_config() error #179

Open
ndricimdanaj opened this issue Jul 21, 2020 · 3 comments
Open

ios.commit_config() error #179

ndricimdanaj opened this issue Jul 21, 2020 · 3 comments

Comments

@ndricimdanaj
Copy link

please can some-body help
ios.commit_config() error here is the following scripts

from napalm import get_network_driver

driver = get_network_driver('ios')

optional_args = {'secret': 'cisco'} #cisco is the enable password
ios = driver('10.1.1.40', 'admin', 'cisco', optional_args=optional_args)
ios.open()

ios.load_replace_candidate(filename='config.txt')

diff = ios.compare_config()
#print(diff)
if len(diff):
print(diff)
print('Commit changes...')
ios.commit_config()
print('Done')
else:
print('No changes required')
ios.discard_config()

answer = input('Rollback config?')
if answer == 'yes':
ios.rollback()

ios.close()
error 3 napalm

@itdependsnetworks
Copy link
Contributor

@itdependsnetworks
Copy link
Contributor

It is a Cisco ios configuration option, however you would go about that. You can manually add it or do a one time merge_config similar to how you are trying to do a replace.

Side note, this is for napalm-ansible, you are not showing anything ansible related though.

@ndricimdanaj
Copy link
Author

it s clear for me the archive option,
the real obstacle i am occurring is that always shows an error at method ios.commit_config()
what do you suggest
above is the code

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

No branches or pull requests

2 participants