mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-03 04:07:52 +00:00
cisco_ap_ctl.py cisco_wifi_ctl.py : LCS-45 Read AP for Power
remember to send info to stdout (have to do a print )
This commit is contained in:
@@ -205,6 +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
|
||||
i = egg.expect_exact([AP_MORE,pexpect.TIMEOUT],timeout=5)
|
||||
if i == 0:
|
||||
egg.sendcontrol('c')
|
||||
@@ -215,6 +217,9 @@ def main():
|
||||
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')
|
||||
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
|
||||
|
||||
i = egg.expect_exact([AP_MORE,pexpect.TIMEOUT],timeout=5)
|
||||
if i == 0:
|
||||
egg.sendcontrol('c')
|
||||
|
||||
Reference in New Issue
Block a user