Changed string check to verify that EOS device is not in config mode. (#28332)

Changed string check to verify that EOS device is not in config mode. This was required in order to work with Arista 7500 series modular switches.
Resolves #2830
pull/28404/head
Bobby Watson 7 years ago committed by Chris Alfonso
parent bd56e6c9ce
commit 8e8a7c869a

@ -76,7 +76,7 @@ class ActionModule(_ActionModule):
# make sure we are in the right cli context which should be
# enable mode and not config module
rc, out, err = connection.exec_command('prompt()')
while str(out).strip().endswith(')#'):
while '(config' in str(out):
display.vvvv('wrong context, sending exit to device', self._play_context.remote_addr)
connection.exec_command('exit')
rc, out, err = connection.exec_command('prompt()')

Loading…
Cancel
Save