Lenovo enos bugfixes (#33857)

* Bug Fixes to issues foubd during testing

* Removing blank line

* undefined-variable Undefined variable 'run_commands' and training new line

* Reverting and Modifying changes with both Unit test and Integrated test with Devices passing
This commit is contained in:
Anil Kumar Muraleedharan 2017-12-14 02:27:51 +05:30 committed by John R Barker
parent 15a58d498d
commit 890b97a38f
2 changed files with 12 additions and 12 deletions

View file

@ -97,7 +97,11 @@ def get_connection(module):
def get_config(module, flags=None):
flags = [] if flags is None else flags
passwords = module.params['passwords']
passwords = None
try:
passwords = module.params['passwords']
except KeyError:
passwords = None
if passwords:
cmd = 'more system:running-config'
else:
@ -147,6 +151,7 @@ def run_commands(module, commands, check_rc=True):
def load_config(module, config):
try:
conn = get_connection(module)
conn.get('enable')
conn.edit_config(config)
except ConnectionError as exc:
module.fail_json(msg=to_text(exc))