mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 11:48:03 +00:00
need time for telnet to establish
This commit is contained in:
@@ -187,7 +187,6 @@ def main():
|
|||||||
while logged_in_9800 == False and loop_count <= 2:
|
while logged_in_9800 == False and loop_count <= 2:
|
||||||
loop_count += 1
|
loop_count += 1
|
||||||
egg.sendline(CR)
|
egg.sendline(CR)
|
||||||
sleep(3)
|
|
||||||
i = egg.expect_exact(["Escape character is '^]'.","WLC>","WLC#","User:","Password:","WLC(config)#","Bad secrets",pexpect.TIMEOUT],timeout=2)
|
i = egg.expect_exact(["Escape character is '^]'.","WLC>","WLC#","User:","Password:","WLC(config)#","Bad secrets",pexpect.TIMEOUT],timeout=2)
|
||||||
if i == 0:
|
if i == 0:
|
||||||
logg.info("9800 found Escape character is '^] i: {} before: {} after: {}".format(i,egg.before,egg.after))
|
logg.info("9800 found Escape character is '^] i: {} before: {} after: {}".format(i,egg.before,egg.after))
|
||||||
@@ -392,7 +391,7 @@ def main():
|
|||||||
logg.info("Spawn: "+cmd+NL)
|
logg.info("Spawn: "+cmd+NL)
|
||||||
egg = pexpect.spawn(cmd)
|
egg = pexpect.spawn(cmd)
|
||||||
egg.logfile = FileAdapter(logg)
|
egg.logfile = FileAdapter(logg)
|
||||||
time.sleep(0.1)
|
time.sleep(2)
|
||||||
logged_in_9800 = False
|
logged_in_9800 = False
|
||||||
loop_count = 0
|
loop_count = 0
|
||||||
found_escape = False
|
found_escape = False
|
||||||
@@ -481,7 +480,7 @@ def main():
|
|||||||
logg.info("Spawn: "+cmd+NL)
|
logg.info("Spawn: "+cmd+NL)
|
||||||
egg = pexpect.spawn(cmd)
|
egg = pexpect.spawn(cmd)
|
||||||
egg.logfile = FileAdapter(logg)
|
egg.logfile = FileAdapter(logg)
|
||||||
time.sleep(0.1)
|
time.sleep(2)
|
||||||
logged_in_9800 = False
|
logged_in_9800 = False
|
||||||
found_escape = False
|
found_escape = False
|
||||||
|
|
||||||
@@ -604,7 +603,7 @@ def main():
|
|||||||
logg.info("Spawn: "+cmd+NL)
|
logg.info("Spawn: "+cmd+NL)
|
||||||
egg = pexpect.spawn(cmd)
|
egg = pexpect.spawn(cmd)
|
||||||
egg.logfile = FileAdapter(logg)
|
egg.logfile = FileAdapter(logg)
|
||||||
time.sleep(0.1)
|
time.sleep(2)
|
||||||
logged_in_9800 = False
|
logged_in_9800 = False
|
||||||
found_escape = False
|
found_escape = False
|
||||||
if i == 6:
|
if i == 6:
|
||||||
@@ -624,7 +623,7 @@ def main():
|
|||||||
logg.info("Spawn: "+cmd+NL)
|
logg.info("Spawn: "+cmd+NL)
|
||||||
egg = pexpect.spawn(cmd)
|
egg = pexpect.spawn(cmd)
|
||||||
egg.logfile = FileAdapter(logg)
|
egg.logfile = FileAdapter(logg)
|
||||||
time.sleep(0.1)
|
time.sleep(2)
|
||||||
logged_in_9800 = False
|
logged_in_9800 = False
|
||||||
found_escape = False
|
found_escape = False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user