vyos implementation for net_interface module (#26799)

* vyos implementation for net_interface module

*  vyos_interface implementation module
*  vyos_interface integration test
*  net_interface integration test for vyos

* Change collection to aggregate
This commit is contained in:
Ganesh Nalawade 2017-07-14 19:39:21 +05:30 committed by GitHub
parent a1977d9654
commit 751ad7021c
10 changed files with 733 additions and 1 deletions

View file

@ -113,7 +113,11 @@ def load_config(module, commands, commit=False, comment=None):
cmd = 'commit'
if comment:
cmd += ' comment "%s"' % comment
exec_command(module, cmd)
rc, out, err = exec_command(module, cmd)
if rc != 0:
# discard any changes in case of failure
exec_command(module, 'exit discard')
module.fail_json(msg='commit failed: %s' % err)
if not commit:
exec_command(module, 'exit discard')