py-json: renames methods to snake_case as per PEP8

This commit is contained in:
Jed Reynolds
2020-06-03 16:51:33 -07:00
parent 93012bd20c
commit 2a1e79949f
4 changed files with 67 additions and 67 deletions

View File

@@ -20,7 +20,7 @@ staNameUri = "port/1/1/" + staName
class ConnectTest(LFCliBase): class ConnectTest(LFCliBase):
def __init__(self, lfhost, lfport): def __init__(self, lfhost, lfport):
super().__init__(lfhost, lfport, True) super().__init__(lfhost, lfport, True)
super().checkConnect() super().check_connect()
# compare pre-test values to post-test values # compare pre-test values to post-test values
@staticmethod @staticmethod
@@ -34,7 +34,7 @@ class ConnectTest(LFCliBase):
def run(self): def run(self):
print("See home/lanforge/Documents/connectTestLogs/connectTestLatest for specific values on latest test") print("See home/lanforge/Documents/connectTestLogs/connectTestLatest for specific values on latest test")
eth1IP = super().jsonGet("port/1/1/eth1") eth1IP = super().json_get("port/1/1/eth1")
if eth1IP['interface']['ip'] == "0.0.0.0": if eth1IP['interface']['ip'] == "0.0.0.0":
print("Warning: Eth1 lacks ip address") print("Warning: Eth1 lacks ip address")
exit(1) exit(1)
@@ -42,7 +42,7 @@ class ConnectTest(LFCliBase):
# Create stations and turn dhcp on # Create stations and turn dhcp on
print("Creating station and turning on dhcp") print("Creating station and turning on dhcp")
response = super().jsonGet(staNameUri) response = super().json_get(staNameUri)
if response is not None: if response is not None:
if response["interface"] is not None: if response["interface"] is not None:
print("removing old station") print("removing old station")
@@ -62,7 +62,7 @@ class ConnectTest(LFCliBase):
"mac": "xx:xx:xx:xx:*:xx", "mac": "xx:xx:xx:xx:*:xx",
"flags": (0x400 + 0x20000 + 0x1000000000) # create admin down "flags": (0x400 + 0x20000 + 0x1000000000) # create admin down
} }
super().jsonPost(url, data) super().json_post(url, data)
time.sleep(0.05) time.sleep(0.05)
reqURL = "cli-json/set_port" reqURL = "cli-json/set_port"
data = { data = {
@@ -72,16 +72,16 @@ class ConnectTest(LFCliBase):
"current_flags": (0x1 + 0x80000000), "current_flags": (0x1 + 0x80000000),
"interest": (0x2 + 0x4000 + 0x800000) # current, dhcp, down, "interest": (0x2 + 0x4000 + 0x800000) # current, dhcp, down,
} }
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
time.sleep(0.5) time.sleep(0.5)
super().jsonPost("cli-json/set_port", portUpRequest(1, staName)) super().json_post("cli-json/set_port", portUpRequest(1, staName))
reqURL = "cli-json/nc_show_ports" reqURL = "cli-json/nc_show_ports"
data = {"shelf": 1, data = {"shelf": 1,
"resource": 1, "resource": 1,
"port": staName, "port": staName,
"probe_flags": 1} "probe_flags": 1}
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
time.sleep(0.5) time.sleep(0.5)
waitUntilPortsAdminUp(1, mgrURL, [staName]) waitUntilPortsAdminUp(1, mgrURL, [staName])
@@ -89,7 +89,7 @@ class ConnectTest(LFCliBase):
maxTime = 300 maxTime = 300
ip = "0.0.0.0" ip = "0.0.0.0"
while (ip == "0.0.0.0") and (duration < maxTime): while (ip == "0.0.0.0") and (duration < maxTime):
station_info = super().jsonGet(staNameUri + "?fields=port,ip") station_info = super().json_get(staNameUri + "?fields=port,ip")
LFUtils.debug_printer.pprint(station_info) LFUtils.debug_printer.pprint(station_info)
if (station_info is not None) and ("interface" in station_info) and ("ip" in station_info["interface"]): if (station_info is not None) and ("interface" in station_info) and ("ip" in station_info["interface"]):
ip = station_info["interface"]["ip"] ip = station_info["interface"]["ip"]
@@ -127,7 +127,7 @@ class ConnectTest(LFCliBase):
"url_rate": 600, "url_rate": 600,
"url": "dl http://10.40.0.1/ /dev/null" "url": "dl http://10.40.0.1/ /dev/null"
} }
super().jsonPost(url, data) super().json_post(url, data)
time.sleep(.05) time.sleep(.05)
# create cx for l4_endp # create cx for l4_endp
@@ -138,7 +138,7 @@ class ConnectTest(LFCliBase):
"tx_endp": "l4Test", "tx_endp": "l4Test",
"rx_endp": "NA" "rx_endp": "NA"
} }
super().jsonPost(url, data) super().json_post(url, data)
time.sleep(.05) time.sleep(.05)
# create fileio endpoint # create fileio endpoint
@@ -151,7 +151,7 @@ class ConnectTest(LFCliBase):
"type": "fe_nfs", "type": "fe_nfs",
"directory": "/mnt/fe-test" "directory": "/mnt/fe-test"
} }
super().jsonPost(url, data) super().json_post(url, data)
time.sleep(.05) time.sleep(.05)
# create fileio cx # create fileio cx
@@ -162,7 +162,7 @@ class ConnectTest(LFCliBase):
"tx_endp": "fioTest", "tx_endp": "fioTest",
"rx_endp": "NA" "rx_endp": "NA"
} }
super().jsonPost(url, data) super().json_post(url, data)
time.sleep(.05) time.sleep(.05)
# create generic endpoints # create generic endpoints
@@ -183,7 +183,7 @@ class ConnectTest(LFCliBase):
"tx_endp": "genTest1", "tx_endp": "genTest1",
"rx_endp": "genTest2" "rx_endp": "genTest2"
} }
super().jsonPost(url, data) super().json_post(url, data)
time.sleep(.05) time.sleep(.05)
# create redirects for wanlink # create redirects for wanlink
@@ -194,7 +194,7 @@ class ConnectTest(LFCliBase):
"port": "rdd0", "port": "rdd0",
"peer_ifname": "rdd1" "peer_ifname": "rdd1"
} }
super().jsonPost(url, data) super().json_post(url, data)
url = "cli-json/add_rdd" url = "cli-json/add_rdd"
data = { data = {
@@ -203,7 +203,7 @@ class ConnectTest(LFCliBase):
"port": "rdd1", "port": "rdd1",
"peer_ifname": "rdd0" "peer_ifname": "rdd0"
} }
super().jsonPost(url, data) super().json_post(url, data)
time.sleep(.05) time.sleep(.05)
# reset redirect ports # reset redirect ports
@@ -213,7 +213,7 @@ class ConnectTest(LFCliBase):
"resource": 1, "resource": 1,
"port": "rdd0" "port": "rdd0"
} }
super().jsonPost(url, data) super().json_post(url, data)
url = "cli-json/reset_port" url = "cli-json/reset_port"
data = { data = {
@@ -221,7 +221,7 @@ class ConnectTest(LFCliBase):
"resource": 1, "resource": 1,
"port": "rdd1" "port": "rdd1"
} }
super().jsonPost(url, data) super().json_post(url, data)
time.sleep(.05) time.sleep(.05)
# create wanlink endpoints # create wanlink endpoints
@@ -234,7 +234,7 @@ class ConnectTest(LFCliBase):
"latency": 20, "latency": 20,
"max_rate": 1544000 "max_rate": 1544000
} }
super().jsonPost(url, data) super().json_post(url, data)
url = "cli-json/add_wl_endp" url = "cli-json/add_wl_endp"
data = { data = {
@@ -245,7 +245,7 @@ class ConnectTest(LFCliBase):
"latency": 30, "latency": 30,
"max_rate": 1544000 "max_rate": 1544000
} }
super().jsonPost(url, data) super().json_post(url, data)
time.sleep(.05) time.sleep(.05)
# create wanlink cx # create wanlink cx
@@ -256,7 +256,7 @@ class ConnectTest(LFCliBase):
"tx_endp": "wlan0", "tx_endp": "wlan0",
"rx_endp": "wlan1" "rx_endp": "wlan1"
} }
super().jsonPost(url, data) super().json_post(url, data)
time.sleep(.5) time.sleep(.5)
cxNames = ["testTCP", "testUDP", "CX_l4Test", "CX_fioTest", "CX_genTest1", "CX_wlan0"] cxNames = ["testTCP", "testUDP", "CX_l4Test", "CX_fioTest", "CX_genTest1", "CX_wlan0"]
@@ -264,14 +264,14 @@ class ConnectTest(LFCliBase):
# get data before running traffic # get data before running traffic
try: try:
get_info = {} get_info = {}
get_info['testTCPA'] = super().jsonGet("endp/testTCP-A?fields=tx+bytes,rx+bytes") get_info['testTCPA'] = super().json_get("endp/testTCP-A?fields=tx+bytes,rx+bytes")
get_info['testTCPB'] = super().jsonGet("endp/testTCP-B?fields=tx+bytes,rx+bytes") get_info['testTCPB'] = super().json_get("endp/testTCP-B?fields=tx+bytes,rx+bytes")
get_info['testUDPA'] = super().jsonGet("endp/testUDP-A?fields=tx+bytes,rx+bytes") get_info['testUDPA'] = super().json_get("endp/testUDP-A?fields=tx+bytes,rx+bytes")
get_info['testUDPB'] = super().jsonGet("endp/testUDP-B?fields=tx+bytes,rx+bytes") get_info['testUDPB'] = super().json_get("endp/testUDP-B?fields=tx+bytes,rx+bytes")
get_info['l4Test'] = super().jsonGet("layer4/l4Test?fields=bytes-rd") get_info['l4Test'] = super().json_get("layer4/l4Test?fields=bytes-rd")
get_info['genTest1'] = super().jsonGet("generic/genTest1?fields=last+results") get_info['genTest1'] = super().json_get("generic/genTest1?fields=last+results")
get_info['wlan0'] = super().jsonGet("wl_ep/wlan0") get_info['wlan0'] = super().json_get("wl_ep/wlan0")
get_info['wlan1'] = super().jsonGet("wl_ep/wlan1") get_info['wlan1'] = super().json_get("wl_ep/wlan1")
for name in get_info: for name in get_info:
if 'endpoint' not in name: if 'endpoint' not in name:
@@ -383,32 +383,32 @@ class ConnectTest(LFCliBase):
print("Collecting Data") print("Collecting Data")
try: try:
ptestTCPA = super().jsonGet("endp/testTCP-A?fields=tx+bytes,rx+bytes") ptestTCPA = super().json_get("endp/testTCP-A?fields=tx+bytes,rx+bytes")
ptestTCPATX = ptestTCPA['endpoint']['tx bytes'] ptestTCPATX = ptestTCPA['endpoint']['tx bytes']
ptestTCPARX = ptestTCPA['endpoint']['rx bytes'] ptestTCPARX = ptestTCPA['endpoint']['rx bytes']
ptestTCPB = super().jsonGet("endp/testTCP-B?fields=tx+bytes,rx+bytes") ptestTCPB = super().json_get("endp/testTCP-B?fields=tx+bytes,rx+bytes")
ptestTCPBTX = ptestTCPB['endpoint']['tx bytes'] ptestTCPBTX = ptestTCPB['endpoint']['tx bytes']
ptestTCPBRX = ptestTCPB['endpoint']['rx bytes'] ptestTCPBRX = ptestTCPB['endpoint']['rx bytes']
ptestUDPA = super().jsonGet("endp/testUDP-A?fields=tx+bytes,rx+bytes") ptestUDPA = super().json_get("endp/testUDP-A?fields=tx+bytes,rx+bytes")
ptestUDPATX = ptestUDPA['endpoint']['tx bytes'] ptestUDPATX = ptestUDPA['endpoint']['tx bytes']
ptestUDPARX = ptestUDPA['endpoint']['rx bytes'] ptestUDPARX = ptestUDPA['endpoint']['rx bytes']
ptestUDPB = super().jsonGet("endp/testUDP-B?fields=tx+bytes,rx+bytes") ptestUDPB = super().json_get("endp/testUDP-B?fields=tx+bytes,rx+bytes")
ptestUDPBTX = ptestUDPB['endpoint']['tx bytes'] ptestUDPBTX = ptestUDPB['endpoint']['tx bytes']
ptestUDPBRX = ptestUDPB['endpoint']['rx bytes'] ptestUDPBRX = ptestUDPB['endpoint']['rx bytes']
pl4Test = super().jsonGet("layer4/l4Test?fields=bytes-rd") pl4Test = super().json_get("layer4/l4Test?fields=bytes-rd")
pl4TestBR = pl4Test['endpoint']['bytes-rd'] pl4TestBR = pl4Test['endpoint']['bytes-rd']
pgenTest1 = super().jsonGet("generic/genTest1?fields=last+results") pgenTest1 = super().json_get("generic/genTest1?fields=last+results")
pgenTest1LR = pgenTest1['endpoint']['last results'] pgenTest1LR = pgenTest1['endpoint']['last results']
pwlan0 = super().jsonGet("wl_ep/wlan0") pwlan0 = super().json_get("wl_ep/wlan0")
pwlan0TXB = pwlan0['endpoint']['tx bytes'] pwlan0TXB = pwlan0['endpoint']['tx bytes']
pwlan0RXP = pwlan0['endpoint']['rx pkts'] pwlan0RXP = pwlan0['endpoint']['rx pkts']
pwlan1 = super().jsonGet("wl_ep/wlan1") pwlan1 = super().json_get("wl_ep/wlan1")
pwlan1TXB = pwlan1['endpoint']['tx bytes'] pwlan1TXB = pwlan1['endpoint']['tx bytes']
pwlan1RXP = pwlan1['endpoint']['rx pkts'] pwlan1RXP = pwlan1['endpoint']['rx pkts']
except Exception as e: except Exception as e:
@@ -421,7 +421,7 @@ class ConnectTest(LFCliBase):
"resource": 1, "resource": 1,
"port": staName "port": staName
} }
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
endpNames = ["testTCP-A", "testTCP-B", endpNames = ["testTCP-A", "testTCP-B",
"testUDP-A", "testUDP-B", "testUDP-A", "testUDP-B",

View File

@@ -19,7 +19,7 @@ class LFCliBase:
self.haltOnError = _halt_on_error self.haltOnError = _halt_on_error
self.mgr_url = "http://%s:%s/" % (self.lfjson_host, self.lfjson_port) self.mgr_url = "http://%s:%s/" % (self.lfjson_host, self.lfjson_port)
def jsonPost(self, _req_url, _data): def json_post(self, _req_url, _data):
json_response = None json_response = None
if self.mgr_url.endswith('/') and _req_url.startswith('/'): if self.mgr_url.endswith('/') and _req_url.startswith('/'):
_req_url = _req_url[1:] _req_url = _req_url[1:]
@@ -42,7 +42,7 @@ class LFCliBase:
return json_response return json_response
def jsonGet(self, _req_url): def json_get(self, _req_url):
json_response = None json_response = None
if self.mgr_url.endswith('/') and _req_url.startswith('/'): if self.mgr_url.endswith('/') and _req_url.startswith('/'):
_req_url = _req_url[1:] _req_url = _req_url[1:]
@@ -71,15 +71,15 @@ class LFCliBase:
#else: #else:
# print("continuing...") # print("continuing...")
def checkConnect(self): def check_connect(self):
print(f"Checking for LANforge GUI connection: {self.mgr_url}") print(f"Checking for LANforge GUI connection: {self.mgr_url}")
response = self.jsonGet("/") response = self.json_get("/")
duration = 0 duration = 0
while (response is None) and (duration < 300): while (response is None) and (duration < 300):
print(f"LANforge GUI connection not found sleeping 5 seconds, tried: {self.mgr_url}") print(f"LANforge GUI connection not found sleeping 5 seconds, tried: {self.mgr_url}")
duration += 2 duration += 2
time.sleep(2) time.sleep(2)
response = self.jsonGet("") response = self.json_get("")
if duration >= 300: if duration >= 300:
print("Could not connect to LANforge GUI") print("Could not connect to LANforge GUI")

View File

@@ -21,7 +21,7 @@ class GenericCx(LFCliBase):
"port": port, "port": port,
"type": type "type": type
} }
super().jsonPost("cli-json/add_gen_endp", data) super().json_post("cli-json/add_gen_endp", data)
def setFlags(self, endpName, flagName, val): def setFlags(self, endpName, flagName, val):
data = { data = {
@@ -29,11 +29,11 @@ class GenericCx(LFCliBase):
"flag": flagName, "flag": flagName,
"val": val "val": val
} }
super().jsonPost("cli-json/set_endp_flag", data) super().json_post("cli-json/set_endp_flag", data)
def setCmd(self, endpName, cmd): def setCmd(self, endpName, cmd):
data = { data = {
"name": endpName, "name": endpName,
"command": cmd "command": cmd
} }
super().jsonPost("cli-json/set_gen_cmd", data) super().json_post("cli-json/set_gen_cmd", data)

View File

@@ -67,8 +67,8 @@ class StaConnect(LFCliBase):
print("FAILED: %s did not report traffic: %s" % (name, postVal)) print("FAILED: %s did not report traffic: %s" % (name, postVal))
def run(self): def run(self):
self.checkConnect() self.check_connect()
eth1IP = self.jsonGet(self.getUpstreamUrl()) eth1IP = self.json_get(self.getUpstreamUrl())
if eth1IP is None: if eth1IP is None:
print("Unable to query "+self.upstream_port+", bye") print("Unable to query "+self.upstream_port+", bye")
sys.exit(1) sys.exit(1)
@@ -76,7 +76,7 @@ class StaConnect(LFCliBase):
print(f"Warning: {self.getUpstreamUrl()} lacks ip address") print(f"Warning: {self.getUpstreamUrl()} lacks ip address")
url = self.getStaUrl() url = self.getStaUrl()
response = super().jsonGet(url) response = super().json_get(url)
if response is not None: if response is not None:
if response["interface"] is not None: if response["interface"] is not None:
print("removing old station") print("removing old station")
@@ -101,7 +101,7 @@ class StaConnect(LFCliBase):
"flags": flags # verbose, wpa2 "flags": flags # verbose, wpa2
} }
print("Adding new station %s " % self.sta_name) print("Adding new station %s " % self.sta_name)
super().jsonPost(url, data) super().json_post(url, data)
reqURL = "cli-json/set_port" reqURL = "cli-json/set_port"
data = { data = {
@@ -112,14 +112,14 @@ class StaConnect(LFCliBase):
"interest": 0x4002 # set dhcp, current flags "interest": 0x4002 # set dhcp, current flags
} }
print("Configuring %s..." % self.sta_name) print("Configuring %s..." % self.sta_name)
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
reqURL = "cli-json/nc_show_ports" reqURL = "cli-json/nc_show_ports"
data = {"shelf": 1, data = {"shelf": 1,
"resource": self.resource, "resource": self.resource,
"port": self.sta_name, "port": self.sta_name,
"probe_flags": 1} "probe_flags": 1}
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
LFUtils.waitUntilPortsAdminUp(self.resource, self.mgr_url, [self.sta_name]) LFUtils.waitUntilPortsAdminUp(self.resource, self.mgr_url, [self.sta_name])
# station_info = self.jsonGet(self.mgr_url, "%s?fields=port,ip,ap" % (self.getStaUrl())) # station_info = self.jsonGet(self.mgr_url, "%s?fields=port,ip,ap" % (self.getStaUrl()))
@@ -130,7 +130,7 @@ class StaConnect(LFCliBase):
while (ip == "0.0.0.0") and (duration < maxTime): while (ip == "0.0.0.0") and (duration < maxTime):
duration += 2 duration += 2
time.sleep(2) time.sleep(2)
station_info = super().jsonGet(f"{self.getStaUrl()}?fields=port,ip,ap") station_info = super().json_get(f"{self.getStaUrl()}?fields=port,ip,ap")
# LFUtils.debug_printer.pprint(station_info) # LFUtils.debug_printer.pprint(station_info)
if (station_info is not None) and ("interface" in station_info): if (station_info is not None) and ("interface" in station_info):
@@ -176,7 +176,7 @@ class StaConnect(LFCliBase):
"ip_port": "-1", "ip_port": "-1",
"min_rate": 1000000 "min_rate": 1000000
} }
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
reqURL = "cli-json/add_endp" reqURL = "cli-json/add_endp"
data = { data = {
@@ -188,7 +188,7 @@ class StaConnect(LFCliBase):
"ip_port": "-1", "ip_port": "-1",
"min_rate": 1000000 "min_rate": 1000000
} }
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
# Create CX # Create CX
reqURL = "cli-json/add_cx" reqURL = "cli-json/add_cx"
@@ -198,7 +198,7 @@ class StaConnect(LFCliBase):
"tx_endp": "testUDP-A", "tx_endp": "testUDP-A",
"rx_endp": "testUDP-B", "rx_endp": "testUDP-B",
} }
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
# Create TCP endpoints # Create TCP endpoints
reqURL = "cli-json/add_endp" reqURL = "cli-json/add_endp"
@@ -211,7 +211,7 @@ class StaConnect(LFCliBase):
"ip_port": "0", "ip_port": "0",
"min_rate": 1000000 "min_rate": 1000000
} }
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
reqURL = "cli-json/add_endp" reqURL = "cli-json/add_endp"
data = { data = {
@@ -223,7 +223,7 @@ class StaConnect(LFCliBase):
"ip_port": "-1", "ip_port": "-1",
"min_rate": 1000000 "min_rate": 1000000
} }
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
# Create CX # Create CX
reqURL = "cli-json/add_cx" reqURL = "cli-json/add_cx"
@@ -233,7 +233,7 @@ class StaConnect(LFCliBase):
"tx_endp": "testTCP-A", "tx_endp": "testTCP-A",
"rx_endp": "testTCP-B", "rx_endp": "testTCP-B",
} }
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
cxNames = ["testTCP", "testUDP"] cxNames = ["testTCP", "testUDP"]
endpNames = ["testTCP-A", "testTCP-B", endpNames = ["testTCP-A", "testTCP-B",
@@ -248,7 +248,7 @@ class StaConnect(LFCliBase):
"cx_name": cxNames[name], "cx_name": cxNames[name],
"cx_state": "RUNNING" "cx_state": "RUNNING"
} }
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
# Refresh stats # Refresh stats
print("\nRefresh CX stats") print("\nRefresh CX stats")
@@ -258,7 +258,7 @@ class StaConnect(LFCliBase):
"test_mgr": "ALL", "test_mgr": "ALL",
"cross_connect": cxNames[name] "cross_connect": cxNames[name]
} }
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
# print("Sleeping for 15 seconds") # print("Sleeping for 15 seconds")
time.sleep(15) time.sleep(15)
@@ -272,7 +272,7 @@ class StaConnect(LFCliBase):
"cx_name": cxNames[name], "cx_name": cxNames[name],
"cx_state": "STOPPED" "cx_state": "STOPPED"
} }
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
# Refresh stats # Refresh stats
print("\nRefresh CX stats") print("\nRefresh CX stats")
@@ -282,7 +282,7 @@ class StaConnect(LFCliBase):
"test_mgr": "ALL", "test_mgr": "ALL",
"cross_connect": cxNames[name] "cross_connect": cxNames[name]
} }
super().jsonPost(reqURL, data) super().json_post(reqURL, data)
# print("Sleeping for 5 seconds") # print("Sleeping for 5 seconds")
time.sleep(5) time.sleep(5)
@@ -290,19 +290,19 @@ class StaConnect(LFCliBase):
# get data for endpoints JSON # get data for endpoints JSON
print("Collecting Data") print("Collecting Data")
try: try:
ptestTCPA = super().jsonGet("endp/testTCP-A?fields=tx+bytes,rx+bytes") ptestTCPA = super().json_get("endp/testTCP-A?fields=tx+bytes,rx+bytes")
ptestTCPATX = ptestTCPA['endpoint']['tx bytes'] ptestTCPATX = ptestTCPA['endpoint']['tx bytes']
ptestTCPARX = ptestTCPA['endpoint']['rx bytes'] ptestTCPARX = ptestTCPA['endpoint']['rx bytes']
ptestTCPB = super().jsonGet("endp/testTCP-B?fields=tx+bytes,rx+bytes") ptestTCPB = super().json_get("endp/testTCP-B?fields=tx+bytes,rx+bytes")
ptestTCPBTX = ptestTCPB['endpoint']['tx bytes'] ptestTCPBTX = ptestTCPB['endpoint']['tx bytes']
ptestTCPBRX = ptestTCPB['endpoint']['rx bytes'] ptestTCPBRX = ptestTCPB['endpoint']['rx bytes']
ptestUDPA = super().jsonGet("endp/testUDP-A?fields=tx+bytes,rx+bytes") ptestUDPA = super().json_get("endp/testUDP-A?fields=tx+bytes,rx+bytes")
ptestUDPATX = ptestUDPA['endpoint']['tx bytes'] ptestUDPATX = ptestUDPA['endpoint']['tx bytes']
ptestUDPARX = ptestUDPA['endpoint']['rx bytes'] ptestUDPARX = ptestUDPA['endpoint']['rx bytes']
ptestUDPB = super().jsonGet("endp/testUDP-B?fields=tx+bytes,rx+bytes") ptestUDPB = super().json_get("endp/testUDP-B?fields=tx+bytes,rx+bytes")
ptestUDPBTX = ptestUDPB['endpoint']['tx bytes'] ptestUDPBTX = ptestUDPB['endpoint']['tx bytes']
ptestUDPBRX = ptestUDPB['endpoint']['rx bytes'] ptestUDPBRX = ptestUDPB['endpoint']['rx bytes']
except Exception as e: except Exception as e:
@@ -316,7 +316,7 @@ class StaConnect(LFCliBase):
"port": self.sta_name "port": self.sta_name
} }
self.jsonPost(reqURL, data) self.json_post(reqURL, data)
removeCX(self.mgr_url, cxNames) removeCX(self.mgr_url, cxNames)
removeEndps(self.mgr_url, endpNames) removeEndps(self.mgr_url, endpNames)