mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
trying to catch the lockup with cisco controller and graceful exit
This commit is contained in:
@@ -588,13 +588,24 @@ def main():
|
|||||||
logg.info("9800 Timed out waiting for initial prompt send logout i: {} before {} after {}".format(i, egg.before,egg.after))
|
logg.info("9800 Timed out waiting for initial prompt send logout i: {} before {} after {}".format(i, egg.before,egg.after))
|
||||||
egg.sendline(CR)
|
egg.sendline(CR)
|
||||||
sleep(0.2)
|
sleep(0.2)
|
||||||
|
r = 0
|
||||||
|
while( r <= 120):
|
||||||
|
egg.expect(pexpect.TIMEOUT,timeout=0)
|
||||||
|
logg.info("Not seeing prompts r {} before {} after {}".format(r,egg.before,egg.after))
|
||||||
|
egg.sendline("Hello?")
|
||||||
|
sleep(1)
|
||||||
loop_count += 1
|
loop_count += 1
|
||||||
|
|
||||||
if loop_count >= 3:
|
if loop_count >= 3:
|
||||||
if found_escape == True:
|
if found_escape == True:
|
||||||
logg.info("9800 there may be another prompt present that not aware of")
|
logg.info("9800 there may be another prompt present that not aware of")
|
||||||
logg.info("9800 will send escape to close telnet")
|
logg.info("9800 will send escape to close telnet")
|
||||||
|
r = 0
|
||||||
|
while( r <= 120):
|
||||||
|
egg.expect(pexpect.TIMEOUT,timeout=0)
|
||||||
|
logg.info("Not seeing prompts r {} before {} after {}".format(r,egg.before,egg.after))
|
||||||
|
egg.sendline("Hello?")
|
||||||
|
sleep(1)
|
||||||
egg.sendline("\x1b\r")
|
egg.sendline("\x1b\r")
|
||||||
logg.info("9800 the excape was found... close egg session")
|
logg.info("9800 the excape was found... close egg session")
|
||||||
egg.close(force = True)
|
egg.close(force = True)
|
||||||
|
|||||||
Reference in New Issue
Block a user