mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
Reorganized code to separate endpoint and cx creation. Added longer sleep times in a few spots
This commit is contained in:
@@ -106,15 +106,8 @@ class ConnectTest(LFCliBase):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print("Creating endpoints and cross connects")
|
print("Creating endpoints and cross connects")
|
||||||
# create cx for tcp and udp
|
|
||||||
cmd = (
|
|
||||||
"./lf_firemod.pl --action create_cx --cx_name testTCP --use_ports %s,eth1 --use_speeds 360000,150000 --endp_type tcp > ~/Documents/connectTestLogs/connectTestLatest.log" % staName)
|
|
||||||
execWrap(cmd)
|
|
||||||
cmd = (
|
|
||||||
"./lf_firemod.pl --action create_cx --cx_name testUDP --use_ports %s,eth1 --use_speeds 360000,150000 --endp_type udp >> ~/Documents/connectTestLogs/connectTestLatest.log" % staName)
|
|
||||||
execWrap(cmd)
|
|
||||||
time.sleep(.05)
|
|
||||||
|
|
||||||
|
#==============| ENDPOINT CREATION |=================
|
||||||
# create l4 endpoint
|
# create l4 endpoint
|
||||||
url = "/cli-json/add_l4_endp"
|
url = "/cli-json/add_l4_endp"
|
||||||
data = {
|
data = {
|
||||||
@@ -135,17 +128,6 @@ class ConnectTest(LFCliBase):
|
|||||||
super().json_post("/cli-json/nc_show_endpoints", data)
|
super().json_post("/cli-json/nc_show_endpoints", data)
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
# create cx for l4_endp
|
|
||||||
url = "/cli-json/add_cx"
|
|
||||||
data = {
|
|
||||||
"alias": "CX_l4Test",
|
|
||||||
"test_mgr": "default_tm",
|
|
||||||
"tx_endp": "l4Test",
|
|
||||||
"rx_endp": "NA"
|
|
||||||
}
|
|
||||||
super().json_post(url, data)
|
|
||||||
time.sleep(.05)
|
|
||||||
|
|
||||||
# create fileio endpoint
|
# create fileio endpoint
|
||||||
url = "/cli-json/add_file_endp"
|
url = "/cli-json/add_file_endp"
|
||||||
data = {
|
data = {
|
||||||
@@ -164,18 +146,6 @@ class ConnectTest(LFCliBase):
|
|||||||
super().json_post("/cli-json/nc_show_endpoints", data)
|
super().json_post("/cli-json/nc_show_endpoints", data)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|
||||||
# create fileio cx
|
|
||||||
url = "/cli-json/add_cx"
|
|
||||||
data = {
|
|
||||||
"alias": "CX_fioTest",
|
|
||||||
"test_mgr": "default_tm",
|
|
||||||
"tx_endp": "fioTest",
|
|
||||||
"rx_endp": "NA"
|
|
||||||
}
|
|
||||||
super().json_post(url, data)
|
|
||||||
time.sleep(.05)
|
|
||||||
|
|
||||||
# create generic endpoints
|
# create generic endpoints
|
||||||
genl = GenericCx(lfclient_host=self.lfclient_host, lfclient_port=self.lfclient_port)
|
genl = GenericCx(lfclient_host=self.lfclient_host, lfclient_port=self.lfclient_port)
|
||||||
genl.createGenEndp("genTest1", 1, 1, staName, "gen_generic")
|
genl.createGenEndp("genTest1", 1, 1, staName, "gen_generic")
|
||||||
@@ -190,17 +160,6 @@ class ConnectTest(LFCliBase):
|
|||||||
}
|
}
|
||||||
super().json_post("/cli-json/nc_show_endpoints", data)
|
super().json_post("/cli-json/nc_show_endpoints", data)
|
||||||
|
|
||||||
# create generic cx
|
|
||||||
url = "/cli-json/add_cx"
|
|
||||||
data = {
|
|
||||||
"alias": "CX_genTest1",
|
|
||||||
"test_mgr": "default_tm",
|
|
||||||
"tx_endp": "genTest1",
|
|
||||||
"rx_endp": "genTest2"
|
|
||||||
}
|
|
||||||
super().json_post(url, data)
|
|
||||||
time.sleep(.05)
|
|
||||||
|
|
||||||
# create redirects for wanlink
|
# create redirects for wanlink
|
||||||
url = "/cli-json/add_rdd"
|
url = "/cli-json/add_rdd"
|
||||||
data = {
|
data = {
|
||||||
@@ -267,6 +226,51 @@ class ConnectTest(LFCliBase):
|
|||||||
}
|
}
|
||||||
super().json_post("/cli-json/nc_show_endpoints", data)
|
super().json_post("/cli-json/nc_show_endpoints", data)
|
||||||
|
|
||||||
|
time.sleep(10)
|
||||||
|
|
||||||
|
#==============| CX CREATION |===================
|
||||||
|
# create cx for tcp and udp
|
||||||
|
cmd = ("./lf_firemod.pl --action create_cx --cx_name testTCP --use_ports %s,eth1 --use_speeds 360000,"
|
||||||
|
"150000 --endp_type tcp > ~/Documents/connectTestLogs/connectTestLatest.log" % staName)
|
||||||
|
execWrap(cmd)
|
||||||
|
cmd = ("./lf_firemod.pl --action create_cx --cx_name testUDP --use_ports %s,eth1 --use_speeds 360000,"
|
||||||
|
"150000 --endp_type udp >> ~/Documents/connectTestLogs/connectTestLatest.log" % staName)
|
||||||
|
execWrap(cmd)
|
||||||
|
time.sleep(.05)
|
||||||
|
|
||||||
|
# create cx for l4_endp
|
||||||
|
url = "/cli-json/add_cx"
|
||||||
|
data = {
|
||||||
|
"alias": "CX_l4Test",
|
||||||
|
"test_mgr": "default_tm",
|
||||||
|
"tx_endp": "l4Test",
|
||||||
|
"rx_endp": "NA"
|
||||||
|
}
|
||||||
|
super().json_post(url, data)
|
||||||
|
time.sleep(.05)
|
||||||
|
|
||||||
|
# create fileio cx
|
||||||
|
url = "/cli-json/add_cx"
|
||||||
|
data = {
|
||||||
|
"alias": "CX_fioTest",
|
||||||
|
"test_mgr": "default_tm",
|
||||||
|
"tx_endp": "fioTest",
|
||||||
|
"rx_endp": "NA"
|
||||||
|
}
|
||||||
|
super().json_post(url, data)
|
||||||
|
time.sleep(.05)
|
||||||
|
|
||||||
|
# create generic cx
|
||||||
|
url = "/cli-json/add_cx"
|
||||||
|
data = {
|
||||||
|
"alias": "CX_genTest1",
|
||||||
|
"test_mgr": "default_tm",
|
||||||
|
"tx_endp": "genTest1",
|
||||||
|
"rx_endp": "genTest2"
|
||||||
|
}
|
||||||
|
super().json_post(url, data)
|
||||||
|
time.sleep(.05)
|
||||||
|
|
||||||
# create wanlink cx
|
# create wanlink cx
|
||||||
url = "/cli-json/add_cx"
|
url = "/cli-json/add_cx"
|
||||||
data = {
|
data = {
|
||||||
|
|||||||
Reference in New Issue
Block a user