Skip to content

Commit

Permalink
Merge 7ea7889 into 8a356dd
Browse files Browse the repository at this point in the history
  • Loading branch information
bharath-ravindranath committed Nov 10, 2017
2 parents 8a356dd + 7ea7889 commit fee0e68
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions napalm/eos/eos.py
Expand Up @@ -88,6 +88,8 @@ def __init__(self, hostname, username, password, timeout=60, optional_args=None)

self.profile = ["eos"]

self.autoComplete = optional_args.get('autoComplete', False)

def open(self):
"""Implementation of NAPALM method open."""
try:
Expand Down Expand Up @@ -159,7 +161,7 @@ def _load_config(self, filename=None, config=None, replace=True):
commands.append(line)

try:
self.device.run_commands(commands)
self.device.run_commands(commands, autoComplete=self.autoComplete)
except pyeapi.eapilib.CommandError as e:
self.discard_config()
if replace:
Expand Down Expand Up @@ -195,7 +197,7 @@ def commit_config(self):
commands.append('commit')
commands.append('write memory')

self.device.run_commands(commands)
self.device.run_commands(commands, autoComplete=self.autoComplete)
self.config_session = None

def discard_config(self):
Expand All @@ -204,15 +206,15 @@ def discard_config(self):
commands = []
commands.append('configure session {}'.format(self.config_session))
commands.append('abort')
self.device.run_commands(commands)
self.device.run_commands(commands, autoComplete=self.autoComplete)
self.config_session = None

def rollback(self):
"""Implementation of NAPALM method rollback."""
commands = []
commands.append('configure replace flash:rollback-0')
commands.append('write memory')
self.device.run_commands(commands)
self.device.run_commands(commands, autoComplete=self.autoComplete)

def get_facts(self):
"""Implementation of NAPALM method get_facts."""
Expand Down

0 comments on commit fee0e68

Please sign in to comment.