mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 11:48:03 +00:00
lf_cisco_power.py: LCS-45 Read AP for Power values
exit on an exception accessing the AP
This commit is contained in:
@@ -1594,6 +1594,17 @@ def main():
|
||||
ap_info= subprocess.run(["./cisco_ap_ctl.py", "--scheme", ap_dict['ap_scheme'], "--prompt", ap_dict['ap_prompt'],"--dest", ap_dict['ap_ip'], "--port", ap_dict["ap_port"],
|
||||
"--user", ap_dict['ap_user'], "--passwd", ap_dict['ap_pw'],"--action", "powercfg"],capture_output=True, check=True)
|
||||
pss = ap_info.stdout.decode('utf-8', 'ignore');
|
||||
|
||||
except subprocess.CalledProcessError as process_error:
|
||||
logg.info("####################################################################################################")
|
||||
logg.info("# CHECK IF AP HAS TELNET CONNECTION ALREADY ACTIVE")
|
||||
logg.info("####################################################################################################")
|
||||
|
||||
logg.info("####################################################################################################")
|
||||
logg.info("# Unable to commicate to AP error code: {} output {}".format(process_error.returncode, process_error.output))
|
||||
logg.info("####################################################################################################")
|
||||
exit_test(workbook)
|
||||
|
||||
logg.info(pss)
|
||||
for line in pss.splitlines():
|
||||
logg.info("ap {}".format(line))
|
||||
@@ -1618,16 +1629,6 @@ def main():
|
||||
else:
|
||||
logg.info("AP Check regular expression!!!")
|
||||
|
||||
except subprocess.CalledProcessError as process_error:
|
||||
logg.info("####################################################################################################")
|
||||
logg.info("# CHECK IF AP HAS TELNET CONNECTION ALREADY ACTIVE")
|
||||
logg.info("####################################################################################################")
|
||||
|
||||
logg.info("####################################################################################################")
|
||||
logg.info("# Unable to commicate to AP error code: {} output {}".format(process_error.returncode, process_error.output))
|
||||
logg.info("####################################################################################################")
|
||||
# for now this is not a fatal error,
|
||||
|
||||
|
||||
#
|
||||
# The controller may adjust the number of spatial streams to allow for the
|
||||
|
||||
Reference in New Issue
Block a user