mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
added auto mode for 9800 series
This commit is contained in:
@@ -95,7 +95,7 @@ def main():
|
||||
choices=["a", "b", "abgn"])
|
||||
parser.add_argument("--action", type=str, help="perform action",
|
||||
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")
|
||||
|
||||
args = None
|
||||
@@ -402,6 +402,16 @@ def main():
|
||||
else:
|
||||
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)):
|
||||
raise Exception("action requires AP name")
|
||||
if (args.action == "enable"):
|
||||
@@ -524,6 +534,7 @@ def main():
|
||||
print("expect timeout")
|
||||
break
|
||||
|
||||
|
||||
egg.sendline("logout")
|
||||
print("logout")
|
||||
i = egg.expect([LOGOUTPROMPT, EXITPROMPT, CLOSEDBYREMOTE, CLOSEDCX,pexpect.TIMEOUT],timeout=3)
|
||||
|
||||
Reference in New Issue
Block a user