mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-03 04:07:52 +00:00
added auto mode for 9800 series
This commit is contained in:
@@ -95,7 +95,7 @@ def main():
|
|||||||
choices=["a", "b", "abgn"])
|
choices=["a", "b", "abgn"])
|
||||||
parser.add_argument("--action", type=str, help="perform action",
|
parser.add_argument("--action", type=str, help="perform action",
|
||||||
choices=["config", "country", "ap_country", "enable", "disable", "summary", "advanced",
|
choices=["config", "country", "ap_country", "enable", "disable", "summary", "advanced",
|
||||||
"cmd", "txPower", "bandwidth", "manual","ap_channel", "channel", "show", "wlan", "enable_wlan", "delete_wlan", "wlan_qos" ])
|
"cmd", "txPower", "bandwidth", "manual", "auto","ap_channel", "channel", "show", "wlan", "enable_wlan", "delete_wlan", "wlan_qos" ])
|
||||||
parser.add_argument("--value", type=str, help="set value")
|
parser.add_argument("--value", type=str, help="set value")
|
||||||
|
|
||||||
args = None
|
args = None
|
||||||
@@ -402,6 +402,16 @@ def main():
|
|||||||
else:
|
else:
|
||||||
command = "ap name %s dot11 24ghz radio role manual client-serving"%(args.ap)
|
command = "ap name %s dot11 24ghz radio role manual client-serving"%(args.ap)
|
||||||
|
|
||||||
|
if (args.action == "auto" and args.ap is None):
|
||||||
|
raise Exception("action requires AP name")
|
||||||
|
if (args.action == "auto"):
|
||||||
|
if args.series == "9800":
|
||||||
|
if band == "a":
|
||||||
|
command = "ap name %s dot11 5ghz radio role auto"%(args.ap)
|
||||||
|
else:
|
||||||
|
command = "ap name %s dot11 24ghz radio role auto"%(args.ap)
|
||||||
|
|
||||||
|
|
||||||
if (args.action in ["enable", "disable" ] and (args.ap is None)):
|
if (args.action in ["enable", "disable" ] and (args.ap is None)):
|
||||||
raise Exception("action requires AP name")
|
raise Exception("action requires AP name")
|
||||||
if (args.action == "enable"):
|
if (args.action == "enable"):
|
||||||
@@ -524,6 +534,7 @@ def main():
|
|||||||
print("expect timeout")
|
print("expect timeout")
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
egg.sendline("logout")
|
egg.sendline("logout")
|
||||||
print("logout")
|
print("logout")
|
||||||
i = egg.expect([LOGOUTPROMPT, EXITPROMPT, CLOSEDBYREMOTE, CLOSEDCX,pexpect.TIMEOUT],timeout=3)
|
i = egg.expect([LOGOUTPROMPT, EXITPROMPT, CLOSEDBYREMOTE, CLOSEDCX,pexpect.TIMEOUT],timeout=3)
|
||||||
|
|||||||
Reference in New Issue
Block a user