mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
tip_station_powersave.py fixes
This commit is contained in:
@@ -62,8 +62,7 @@ class TIPStationPowersave(LFCliBase):
|
|||||||
self.local_realm = realm.Realm(lfclient_host=self.host,
|
self.local_realm = realm.Realm(lfclient_host=self.host,
|
||||||
lfclient_port=self.port,
|
lfclient_port=self.port,
|
||||||
debug_=self.debug,
|
debug_=self.debug,
|
||||||
halt_on_error_=self.debug,
|
halt_on_error_=self.exit_on_error)
|
||||||
exit_on_error_=self.debug)
|
|
||||||
|
|
||||||
# background traffic
|
# background traffic
|
||||||
self.cx_background = self.local_realm.new_l3_cx_profile()
|
self.cx_background = self.local_realm.new_l3_cx_profile()
|
||||||
@@ -106,13 +105,11 @@ class TIPStationPowersave(LFCliBase):
|
|||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
self.sta_powersave_disabled_profile.use_security("open", ssid=self.ssid, passwd=self.password)
|
self.sta_powersave_disabled_profile.use_security("open", ssid=self.ssid, passwd=self.password)
|
||||||
self.sta_powersave_disabled_profile.set_number_template(self.powersave_disabled_prefix)
|
|
||||||
self.sta_powersave_disabled_profile.set_command_flag("add_sta", "create_admin_down", 1)
|
self.sta_powersave_disabled_profile.set_command_flag("add_sta", "create_admin_down", 1)
|
||||||
self.sta_powersave_disabled_profile.set_command_param("set_port", "report_timer", 5000)
|
self.sta_powersave_disabled_profile.set_command_param("set_port", "report_timer", 5000)
|
||||||
self.sta_powersave_disabled_profile.set_command_flag("set_port", "rpt_timer", 1)
|
self.sta_powersave_disabled_profile.set_command_flag("set_port", "rpt_timer", 1)
|
||||||
|
|
||||||
self.sta_powersave_enabled_profile.use_security("open", ssid=self.ssid, passwd=self.password)
|
self.sta_powersave_enabled_profile.use_security("open", ssid=self.ssid, passwd=self.password)
|
||||||
self.sta_powersave_enabled_profile.set_number_template(self.powersave_enabled_prefix)
|
|
||||||
self.sta_powersave_enabled_profile.set_command_flag("add_sta", "create_admin_down", 1)
|
self.sta_powersave_enabled_profile.set_command_flag("add_sta", "create_admin_down", 1)
|
||||||
self.sta_powersave_enabled_profile.set_command_param("set_port", "report_timer", 5000)
|
self.sta_powersave_enabled_profile.set_command_param("set_port", "report_timer", 5000)
|
||||||
self.sta_powersave_enabled_profile.set_command_flag("set_port", "rpt_timer", 1)
|
self.sta_powersave_enabled_profile.set_command_flag("set_port", "rpt_timer", 1)
|
||||||
@@ -122,6 +119,9 @@ class TIPStationPowersave(LFCliBase):
|
|||||||
channel=self.channel,
|
channel=self.channel,
|
||||||
radio_=self.monitor_radio,
|
radio_=self.monitor_radio,
|
||||||
name_=self.monitor_name)
|
name_=self.monitor_name)
|
||||||
|
LFUtils.wait_until_ports_appear(resource_id=1,
|
||||||
|
base_url=self.local_realm.lfclient_url,
|
||||||
|
port_list=[self.monitor_name])
|
||||||
time.sleep(0.2)
|
time.sleep(0.2)
|
||||||
mon_j = self.json_get("/port/1/%s/%s"%(self.resource, self.monitor_name))
|
mon_j = self.json_get("/port/1/%s/%s"%(self.resource, self.monitor_name))
|
||||||
if ("interface" not in mon_j):
|
if ("interface" not in mon_j):
|
||||||
@@ -243,6 +243,7 @@ def main():
|
|||||||
powersave_station_list = ["sta0001"] #,"sta0002","sta0003","sta0004"]
|
powersave_station_list = ["sta0001"] #,"sta0002","sta0003","sta0004"]
|
||||||
ip_powersave_test = TIPStationPowersave(lfjson_host, lfjson_port,
|
ip_powersave_test = TIPStationPowersave(lfjson_host, lfjson_port,
|
||||||
ssid="jedway-open",
|
ssid="jedway-open",
|
||||||
|
channel_=157,
|
||||||
normal_station_list_=normal_station_list,
|
normal_station_list_=normal_station_list,
|
||||||
normal_station_radio_="wiphy0",
|
normal_station_radio_="wiphy0",
|
||||||
powersave_station_list_=powersave_station_list,
|
powersave_station_list_=powersave_station_list,
|
||||||
|
|||||||
Reference in New Issue
Block a user