mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-31 18:58:01 +00:00
Adding functionality to use flags when modifying and creating stations, DUTs, and VAPs
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -29,6 +29,7 @@ class CreateStation(Realm):
|
||||
_port=None,
|
||||
_mode=0,
|
||||
_sta_list=None,
|
||||
_sta_flags=None,
|
||||
_number_template="00000",
|
||||
_radio="wiphy0",
|
||||
_proxy_str=None,
|
||||
@@ -46,6 +47,7 @@ class CreateStation(Realm):
|
||||
self.password = _password
|
||||
self.mode = _mode
|
||||
self.sta_list = _sta_list
|
||||
self.sta_flags = _sta_flags
|
||||
self.radio = _radio
|
||||
self.timeout = 120
|
||||
self.number_template = _number_template
|
||||
@@ -59,6 +61,10 @@ class CreateStation(Realm):
|
||||
self.station_profile.security = self.security
|
||||
self.station_profile.number_template_ = self.number_template
|
||||
self.station_profile.mode = self.mode
|
||||
if self.sta_flags is not None:
|
||||
self.station_profile.desired_add_sta_flags = self.sta_flags
|
||||
self.station_profile.desired_add_sta_mask = self.sta_flags
|
||||
|
||||
if self.debug:
|
||||
print("----- Station List ----- ----- ----- ----- ----- ----- \n")
|
||||
pprint.pprint(self.sta_list)
|
||||
@@ -99,22 +105,23 @@ def main():
|
||||
|
||||
description='''\
|
||||
create_station.py
|
||||
--------------------
|
||||
Command example:
|
||||
./create_station.py
|
||||
--radio wiphy0
|
||||
--start_id 2
|
||||
--num_stations 3
|
||||
--security open
|
||||
--ssid netgear
|
||||
--passwd BLANK
|
||||
--debug
|
||||
--------------------
|
||||
Command example:
|
||||
./create_station.py
|
||||
--radio wiphy0
|
||||
--start_id 2
|
||||
--num_stations 3
|
||||
--security open
|
||||
--ssid netgear
|
||||
--passwd BLANK
|
||||
--debug
|
||||
''')
|
||||
required = parser.add_argument_group('required arguments')
|
||||
required.add_argument('--start_id', help='--start_id <value> default 0', default=0)
|
||||
|
||||
optional = parser.add_argument_group('Optional arguments')
|
||||
optional.add_argument('--mode', help='Mode for your station (as a number)',default=0)
|
||||
optional.add_argument('--station_flag', help='station flags to add', required=False, default=None, action='append')
|
||||
|
||||
args = parser.parse_args()
|
||||
# if args.debug:
|
||||
@@ -156,6 +163,7 @@ Command example:
|
||||
_password=args.passwd,
|
||||
_security=args.security,
|
||||
_sta_list=station_list,
|
||||
_sta_flags=args.station_flag,
|
||||
_mode=args.mode,
|
||||
_radio=args.radio,
|
||||
_set_txo_data=None,
|
||||
|
||||
Reference in New Issue
Block a user