cisco_ap_ctl.py lf_cisco_dfs.py : added access to AP

This commit is contained in:
Chuck SmileyRekiere
2021-02-10 11:11:45 -07:00
parent 8f9a12e72d
commit 78a3cda248
2 changed files with 49 additions and 3 deletions

View File

@@ -205,8 +205,8 @@ def main():
if (args.action == "powercfg"):
logg.info("execute: show controllers dot11Radio 1 powercfg | g T1")
egg.sendline('show controllers dot11Radio 1 powercfg | g T1')
egg.expect([pexpect.TIMEOUT], timeout=3) # do not delete this allows for subprocess to see output
print(egg.before.decode('utf-8', 'ignore')) # do not delete this allows for subprocess to see output
egg.expect([pexpect.TIMEOUT], timeout=3) # do not delete this for it allows for subprocess to see output
print(egg.before.decode('utf-8', 'ignore')) # do not delete this for it allows for subprocess to see output
i = egg.expect_exact([AP_MORE,pexpect.TIMEOUT],timeout=5)
if i == 0:
egg.sendcontrol('c')
@@ -214,6 +214,15 @@ def main():
logg.info("send cntl c anyway")
egg.sendcontrol('c')
elif (args.action == "clear_log"):
logg.info("execute: clear log")
egg.sendline('clear log')
sleep(0.4)
egg.sendline('show log')
egg.expect([pexpect.TIMEOUT], timeout=2) # do not delete this for it allows for subprocess to see output
print(egg.before.decode('utf-8', 'ignore')) # do not delete this for it allows for subprocess to see output
# allow for normal logout below
else: # no other command at this time so send the same power command
logg.info("no action so execute: show controllers dot11Radio 1 powercfg | g T1")
egg.sendline('show controllers dot11Radio 1 powercfg | g T1')