strip junk before asa config
This commit is contained in:
parent
abd2936da7
commit
4936a2088f
@ -369,6 +369,11 @@ class AsaConfig(ConfigWithShell):
|
|||||||
self._shell_command(channel, 'term pager 0', waitfor='#\s*$', waitmax=1)
|
self._shell_command(channel, 'term pager 0', waitfor='#\s*$', waitmax=1)
|
||||||
shrun = self._shell_command(channel, 'sh run', waitfor=': end')
|
shrun = self._shell_command(channel, 'sh run', waitfor=': end')
|
||||||
|
|
||||||
|
# strip late previous lines and command echo
|
||||||
|
for i in range(0, 5):
|
||||||
|
if re.search('^\s*: Saved\s*$', shrun[i]):
|
||||||
|
del shrun[0:i]
|
||||||
|
|
||||||
iproute = []
|
iproute = []
|
||||||
for cmd in ('sh ip address', 'sh route'):
|
for cmd in ('sh ip address', 'sh route'):
|
||||||
iproute.append('# '+ cmd.center(76, '='))
|
iproute.append('# '+ cmd.center(76, '='))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user