mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
JSON: sta_connect.py: renames use_preexec_ parameter to suppress_related_commands_
This commit is contained in:
@@ -176,7 +176,7 @@ class StaConnect(LFCliBase):
|
||||
for sta_name in self.station_names:
|
||||
add_sta_data["sta_name"] = sta_name
|
||||
print(" %s," % sta_name, end="")
|
||||
self.json_post("/cli-json/add_sta", add_sta_data, use_preexec_=False)
|
||||
self.json_post("/cli-json/add_sta", add_sta_data, suppress_related_commands_=True)
|
||||
time.sleep(0.01)
|
||||
|
||||
set_port_data = {
|
||||
@@ -189,14 +189,14 @@ class StaConnect(LFCliBase):
|
||||
for sta_name in self.station_names:
|
||||
set_port_data["port"] = sta_name
|
||||
print(" %s," % sta_name, end="")
|
||||
self.json_post("/cli-json/set_port", set_port_data, use_preexec_=False)
|
||||
self.json_post("/cli-json/set_port", set_port_data, suppress_related_commands_=True)
|
||||
time.sleep(0.01)
|
||||
print("\nBringing ports up...")
|
||||
data = {"shelf": 1,
|
||||
"resource": self.resource,
|
||||
"port": "ALL",
|
||||
"probe_flags": 1}
|
||||
self.json_post("/cli-json/nc_show_ports", data, use_preexec_=False)
|
||||
self.json_post("/cli-json/nc_show_ports", data, suppress_related_commands_=True)
|
||||
LFUtils.waitUntilPortsAdminUp(self.resource, self.lfclient_url, self.station_names)
|
||||
|
||||
# station_info = self.jsonGet(self.mgr_url, "%s?fields=port,ip,ap" % (self.getStaUrl()))
|
||||
@@ -236,7 +236,7 @@ class StaConnect(LFCliBase):
|
||||
"port": "ALL",
|
||||
"probe_flags": 1
|
||||
}
|
||||
self.json_post("/cli-json/nc_show_ports", data, use_preexec_=False)
|
||||
self.json_post("/cli-json/nc_show_ports", data, suppress_related_commands_=True)
|
||||
|
||||
# make a copy of the connected stations for test records
|
||||
|
||||
@@ -287,14 +287,14 @@ class StaConnect(LFCliBase):
|
||||
"ip_port": "-1",
|
||||
"min_rate": 1000000
|
||||
}
|
||||
self.json_post("/cli-json/add_endp", data, use_preexec_=False)
|
||||
self.json_post("/cli-json/add_endp", data, suppress_related_commands_=True)
|
||||
|
||||
data = {
|
||||
"name" : "testUDP-%s-A" % sta_name,
|
||||
"flag" : "UseAutoNAT",
|
||||
"val" : 1
|
||||
}
|
||||
self.json_post("/cli-json/set_endp_flag", data, use_preexec_=False)
|
||||
self.json_post("/cli-json/set_endp_flag", data, suppress_related_commands_=True)
|
||||
|
||||
data = {
|
||||
"alias": "testUDP-%s-B" % sta_name,
|
||||
@@ -305,14 +305,14 @@ class StaConnect(LFCliBase):
|
||||
"ip_port": "-1",
|
||||
"min_rate": 1000000
|
||||
}
|
||||
self.json_post("/cli-json/add_endp", data, use_preexec_=False)
|
||||
self.json_post("/cli-json/add_endp", data, suppress_related_commands_=True)
|
||||
|
||||
data = {
|
||||
"name" : "testUDP-%s-B" % sta_name,
|
||||
"flag" : "UseAutoNAT",
|
||||
"val" : 1
|
||||
}
|
||||
self.json_post("/cli-json/set_endp_flag", data, use_preexec_=False)
|
||||
self.json_post("/cli-json/set_endp_flag", data, suppress_related_commands_=True)
|
||||
|
||||
# Create CX
|
||||
data = {
|
||||
@@ -321,14 +321,14 @@ class StaConnect(LFCliBase):
|
||||
"tx_endp": "testUDP-%s-A" % sta_name,
|
||||
"rx_endp": "testUDP-%s-B" % sta_name,
|
||||
}
|
||||
self.json_post("/cli-json/add_cx", data, use_preexec_=False)
|
||||
self.json_post("/cli-json/add_cx", data, suppress_related_commands_=True)
|
||||
|
||||
data = {
|
||||
"test_mgr": "default_tm",
|
||||
"cx_name": "testUDP-%s" % sta_name,
|
||||
"milliseconds": 1000
|
||||
}
|
||||
self.json_post("/cli-json/set_cx_report_timer", data, use_preexec_=False)
|
||||
self.json_post("/cli-json/set_cx_report_timer", data, suppress_related_commands_=True)
|
||||
|
||||
# Create TCP endpoints
|
||||
self.cx_names["testTCP-"+sta_name] = { "a": "testUDP-%s-A" % sta_name,
|
||||
@@ -342,7 +342,7 @@ class StaConnect(LFCliBase):
|
||||
"ip_port": "0",
|
||||
"min_rate": 1000000
|
||||
}
|
||||
self.json_post("/cli-json/add_endp", data, use_preexec_=False)
|
||||
self.json_post("/cli-json/add_endp", data, suppress_related_commands_=True)
|
||||
|
||||
data = {
|
||||
"alias": "testTCP-%s-B" % sta_name,
|
||||
@@ -353,7 +353,7 @@ class StaConnect(LFCliBase):
|
||||
"ip_port": "-1",
|
||||
"min_rate": 1000000
|
||||
}
|
||||
self.json_post("/cli-json/add_endp", data, use_preexec_=False)
|
||||
self.json_post("/cli-json/add_endp", data, suppress_related_commands_=True)
|
||||
|
||||
# Create CX
|
||||
data = {
|
||||
@@ -369,7 +369,7 @@ class StaConnect(LFCliBase):
|
||||
"cx_name": "testTCP-%s" % sta_name,
|
||||
"milliseconds": 1000
|
||||
}
|
||||
self.json_post("/cli-json/set_cx_report_timer", data, use_preexec_=False)
|
||||
self.json_post("/cli-json/set_cx_report_timer", data, suppress_related_commands_=True)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user