mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 11:18:03 +00:00
test_l3_powersave_traffic.py: Added command line arguments for choosing radios to use in station and monitor creation
This commit is contained in:
@@ -26,6 +26,7 @@ class L3PowersaveTraffic(LFCliBase):
|
||||
def __init__(self, host, port, ssid, security, password, station_list, side_a_min_rate=56, side_b_min_rate=56,
|
||||
side_a_max_rate=0,
|
||||
side_b_max_rate=0, pdu_size=1000, prefix="00000", test_duration="5m",
|
||||
station_radio="wiphy0", monitor_radio="wiphy1",
|
||||
_debug_on=False, _exit_on_error=False, _exit_on_fail=False):
|
||||
super().__init__(host, port, _debug=_debug_on, _exit_on_fail=_exit_on_fail)
|
||||
self.host = host
|
||||
@@ -35,6 +36,8 @@ class L3PowersaveTraffic(LFCliBase):
|
||||
self.password = password
|
||||
self.sta_list = station_list
|
||||
self.prefix = prefix
|
||||
self.station_radio = station_radio
|
||||
self.monitor_radio = monitor_radio
|
||||
self.debug = _debug_on
|
||||
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port, debug_=False)
|
||||
# upload
|
||||
@@ -69,8 +72,8 @@ class L3PowersaveTraffic(LFCliBase):
|
||||
# channel = self.json_get("/port/1/%s/%s/"%(1,"wiphy0"))
|
||||
# rint("The channel name is...")
|
||||
|
||||
self.new_monitor.create(resource_=1, channel=149, radio_="wiphy1", name_="moni0")
|
||||
self.station_profile.create(radio="wiphy0", sta_names_=self.sta_list, debug=False)
|
||||
self.new_monitor.create(resource_=1, channel=149, radio_=self.monitor_radio, name_="moni0")
|
||||
self.station_profile.create(radio=self.station_radio, sta_names_=self.sta_list, debug=False)
|
||||
# station_channel = self.json_get("/port/1/%s/%s")
|
||||
# pprint.pprint(station_channel)
|
||||
|
||||
@@ -165,6 +168,8 @@ def main():
|
||||
description='''\
|
||||
Example of creating traffic on an l3 connection
|
||||
''')
|
||||
|
||||
parser.add_argument('--monitor_radio', help="--monitor_radio radio to be used in monitor creation", default="wiphy1")
|
||||
args = parser.parse_args()
|
||||
|
||||
lfjson_host = args.mgr
|
||||
@@ -172,9 +177,9 @@ Example of creating traffic on an l3 connection
|
||||
station_list = LFUtils.portNameSeries(prefix_="sta", start_id_=0, end_id_=4, padding_number_=10000)
|
||||
ip_powersave_test = L3PowersaveTraffic(lfjson_host, lfjson_port, ssid=args.ssid, security=args.security,
|
||||
password=args.passwd, station_list=station_list, side_a_min_rate=2000,
|
||||
side_b_min_rate=2000, side_a_max_rate=0,
|
||||
side_b_max_rate=0, prefix="00000", test_duration="30s",
|
||||
_debug_on=False, _exit_on_error=True, _exit_on_fail=True)
|
||||
side_b_min_rate=2000, side_a_max_rate=0, station_radio=args.radio,
|
||||
monitor_radio=args.monitor_radio, side_b_max_rate=0, prefix="00000",
|
||||
test_duration="30s", _debug_on=False, _exit_on_error=True, _exit_on_fail=True)
|
||||
ip_powersave_test.cleanup()
|
||||
ip_powersave_test.build()
|
||||
ip_powersave_test.start()
|
||||
|
||||
Reference in New Issue
Block a user