Remove redundant methods and add new ones.
TEST=None
BUG=chromium:232218, chromium:232226
Change-Id: I0d4f2fe8a06e76af145ddc00de14639ea916227e
Reviewed-on: https://gerrit.chromium.org/gerrit/48600
Reviewed-by: Kris Rambish <krisr@chromium.org>
Commit-Queue: Deepak Gopal <deepakg@chromium.org>
Tested-by: Deepak Gopal <deepakg@chromium.org>
diff --git a/server/cros/chaos_ap_configurators/linksyse2000_ap_configurator.py b/server/cros/chaos_ap_configurators/linksyse2000_ap_configurator.py
index 1468113..66851d9 100644
--- a/server/cros/chaos_ap_configurators/linksyse2000_ap_configurator.py
+++ b/server/cros/chaos_ap_configurators/linksyse2000_ap_configurator.py
@@ -230,7 +230,6 @@
def _set_security_wpa2psk(self, shared_key):
- logging.debug('update_interval is not supported')
popup = '//select[@name="security_mode2"]'
self.select_item_from_popup_by_xpath('WPA Personal', popup,
alert_handler=self._sec_alert)
@@ -238,6 +237,14 @@
self.set_content_of_text_field_by_xpath(shared_key, text,
abort_check=False)
+ def is_update_interval_supported(self):
+ """
+ Returns True if setting the PSK refresh interval is supported.
+
+ @return True is supported; False otherwise
+ """
+ return False
+
def set_visibility(self, visible=True):
self.add_item_to_command_list(self._set_visibility, (visible,), 1, 900)
diff --git a/server/cros/chaos_ap_configurators/linksyse2100_ap_configurator.py b/server/cros/chaos_ap_configurators/linksyse2100_ap_configurator.py
index 9b8c259..7f43612 100644
--- a/server/cros/chaos_ap_configurators/linksyse2100_ap_configurator.py
+++ b/server/cros/chaos_ap_configurators/linksyse2100_ap_configurator.py
@@ -10,10 +10,6 @@
"""Derived class to control Linksys E2100 router."""
- def set_mode(self, mode, band=None):
- self.add_item_to_command_list(self._set_mode, (mode,), 1, 800)
-
-
def _set_mode(self, mode, band=None):
mode_mapping = {self.mode_m:'Mixed',
self.mode_b | self.mode_g:'BG-Mixed',
@@ -30,19 +26,11 @@
alert_handler=self._sec_alert)
- def set_ssid(self, ssid):
- self.add_item_to_command_list(self._set_ssid, (ssid,), 1, 900)
-
-
def _set_ssid(self, ssid):
xpath = '//input[@maxlength="32" and @name="wl_ssid"]'
self.set_content_of_text_field_by_xpath(ssid, xpath, abort_check=False)
- def set_channel(self, channel):
- self.add_item_to_command_list(self._set_channel, (channel,), 1, 900)
-
-
def _set_channel(self, channel):
position = self._get_channel_popup_position(channel)
xpath = '//select[@name="wl_schannel"]'
@@ -54,11 +42,6 @@
self.select_item_from_popup_by_xpath(channels[position], xpath)
- def set_channel_width(self, channel_wid):
- self.add_item_to_command_list(self._set_channel_width,(channel_wid,),
- 1, 900)
-
-
def _set_ch_width(self, channel_wid):
channel_width_choice = ['Auto', 'Standard - 20MHz Channel']
xpath = '//select[@name="_wl_nbw"]'
@@ -94,13 +77,6 @@
self.click_button_by_xpath(xpath, alert_handler=self._sec_alert)
- def set_security_wpapsk(self, shared_key, update_interval=None):
- # WEP and WPA-Personal are not supported for Wireless-N only mode,
- # so use WPA2-Personal when in mode_n.
- self.add_item_to_command_list(self._set_security_psk, (shared_key,
- update_interval, 'WPA Personal'), 2, 900)
-
-
def _set_security_psk(self, shared_key, update_interval=None,
rsn_mode='WPA Personal'):
popup = '//select[@name="security_mode2"]'
@@ -111,8 +87,13 @@
abort_check=True)
- def set_visibility(self, visible=True):
- self.add_item_to_command_list(self._set_visibility, (visible,), 1, 900)
+ def is_update_interval_supported(self):
+ """
+ Returns True if setting the PSK refresh interval is supported.
+
+ @return True is supported; False otherwise
+ """
+ return False
def _set_visibility(self, visible=True):
diff --git a/server/cros/chaos_ap_configurators/linksyse2500_ap_configurator.py b/server/cros/chaos_ap_configurators/linksyse2500_ap_configurator.py
index 0ff25ce..2dd219c 100644
--- a/server/cros/chaos_ap_configurators/linksyse2500_ap_configurator.py
+++ b/server/cros/chaos_ap_configurators/linksyse2500_ap_configurator.py
@@ -119,20 +119,6 @@
xpath)
- def set_security_disabled(self):
- self.add_item_to_command_list(self._set_security_disabled, (), 2, 900)
-
-
- def set_security_wep(self, key_value, authentication):
- self.add_item_to_command_list(self._set_security_wep,
- (key_value, authentication), 2, 900)
-
-
- def set_security_wpapsk(self, shared_key, update_interval=1800):
- self.add_item_to_command_list(self._set_security_wpapsk,
- (shared_key, update_interval), 2, 900)
-
-
def _set_visibility(self, visible=True):
button = 'closed_24g'
if self.current_band == self.band_5ghz:
diff --git a/server/cros/chaos_ap_configurators/linksyse_dual_band_configurator.py b/server/cros/chaos_ap_configurators/linksyse_dual_band_configurator.py
index 0cf3add..5ad8f16 100644
--- a/server/cros/chaos_ap_configurators/linksyse_dual_band_configurator.py
+++ b/server/cros/chaos_ap_configurators/linksyse_dual_band_configurator.py
@@ -231,6 +231,15 @@
abort_check=True)
+ def is_update_interval_supported(self):
+ """
+ Returns True if setting the PSK refresh interval is supported.
+
+ @return True is supported; False otherwise
+ """
+ return False
+
+
def set_visibility(self, visible=True):
self.add_item_to_command_list(self._set_visibility, (visible,), 1, 900)
diff --git a/server/cros/chaos_ap_configurators/linksyse_single_band_configurator.py b/server/cros/chaos_ap_configurators/linksyse_single_band_configurator.py
index 750c1f2..b15f89b 100644
--- a/server/cros/chaos_ap_configurators/linksyse_single_band_configurator.py
+++ b/server/cros/chaos_ap_configurators/linksyse_single_band_configurator.py
@@ -214,7 +214,6 @@
def _set_security_psk(self, shared_key, upadate_interval=None,
rsn_mode='WPA Personal'):
"""Common method to set wpapsk and wpa2psk modes."""
- logging.debug('update_interval is not supported.')
popup = '//select[@name="wl0_security_mode"]'
self.select_item_from_popup_by_xpath(rsn_mode, popup,
alert_handler=self._sec_alert)
@@ -223,6 +222,15 @@
abort_check=False)
+ def is_update_interval_supported(self):
+ """
+ Returns True if setting the PSK refresh interval is supported.
+
+ @return True is supported; False otherwise
+ """
+ return False
+
+
def set_visibility(self, visible=True):
self.add_item_to_command_list(self._set_visibility, (visible,), 1, 900)