mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 11:48:03 +00:00
sta_connect2: Remove redundant and repetitive code
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -134,7 +134,9 @@ class StaConnect2(LFCliBase):
|
|||||||
super().clear_test_results()
|
super().clear_test_results()
|
||||||
# super(StaConnect, self).clear_test_results().test_results.clear()
|
# super(StaConnect, self).clear_test_results().test_results.clear()
|
||||||
|
|
||||||
def setup(self, extra_securities=[]):
|
def setup(self, extra_securities=None):
|
||||||
|
if extra_securities is None:
|
||||||
|
extra_securities = []
|
||||||
self.clear_test_results()
|
self.clear_test_results()
|
||||||
self.check_connect()
|
self.check_connect()
|
||||||
upstream_json = self.json_get("%s?fields=alias,phantom,down,port,ip" % self.get_upstream_url(), debug_=False)
|
upstream_json = self.json_get("%s?fields=alias,phantom,down,port,ip" % self.get_upstream_url(), debug_=False)
|
||||||
@@ -227,7 +229,7 @@ class StaConnect2(LFCliBase):
|
|||||||
self.station_profile.admin_up()
|
self.station_profile.admin_up()
|
||||||
LFUtils.waitUntilPortsAdminUp(self.resource, self.lfclient_url, self.station_names)
|
LFUtils.waitUntilPortsAdminUp(self.resource, self.lfclient_url, self.station_names)
|
||||||
|
|
||||||
if self.influx_db is not None:
|
if self.influx_db:
|
||||||
grapher = RecordInflux(_influx_host=self.influx_host,
|
grapher = RecordInflux(_influx_host=self.influx_host,
|
||||||
_influx_db=self.influx_db,
|
_influx_db=self.influx_db,
|
||||||
_influx_user=self.influx_user,
|
_influx_user=self.influx_user,
|
||||||
@@ -275,7 +277,7 @@ class StaConnect2(LFCliBase):
|
|||||||
"probe_flags": 1
|
"probe_flags": 1
|
||||||
}
|
}
|
||||||
self.json_post("/cli-json/nc_show_ports", data)
|
self.json_post("/cli-json/nc_show_ports", data)
|
||||||
if self.influx_db is not None:
|
if self.influx_db:
|
||||||
grapher.getdata()
|
grapher.getdata()
|
||||||
LFUtils.wait_until_ports_appear()
|
LFUtils.wait_until_ports_appear()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user