Changed fstrings to % formatting

This commit is contained in:
Logan Lipke
2020-06-04 13:58:59 -07:00
parent 29c18611da
commit 80082e85b1
5 changed files with 53 additions and 53 deletions

View File

@@ -40,13 +40,13 @@ for file in searchResults:
if ver == file[1]: if ver == file[1]:
webFiles.append({'filename':file[0], 'timestamp': datetime.datetime.strptime(file[2], "%Y-%m-%d %H:%M")}) webFiles.append({'filename':file[0], 'timestamp': datetime.datetime.strptime(file[2], "%Y-%m-%d %H:%M")})
if len(webFiles) == 0: if len(webFiles) == 0:
print(f"Failed to find webfile with version number {ver}") print("Failed to find webfile with version number %s" % (ver))
sys.exit(1) sys.exit(1)
#=========CHECK DIR FOR FILES============= #=========CHECK DIR FOR FILES=============
filePath = f"/home/lanforge/Downloads/" filePath = "/home/lanforge/Downloads/"
dir = glob.glob(filePath + f"LANforgeGUI_{ver}*") dir = glob.glob(filePath + "LANforgeGUI_%s*" % ver)
dirFiles = [] dirFiles = []
for file in dir: for file in dir:
@@ -55,7 +55,7 @@ for file in dir:
dirFiles.append({'filename':file[25:], 'timestamp':fileTime}) dirFiles.append({'filename':file[25:], 'timestamp':fileTime})
if len(dirFiles) == 0: if len(dirFiles) == 0:
print(f"Unable to find file in {filePath} with version {ver}") print("Unable to find file in {filePath} with version %s" % ver)
#sys.exit(1) #sys.exit(1)
#============FIND NEWEST FILES============ #============FIND NEWEST FILES============
@@ -79,46 +79,46 @@ else:
if newestWebFile['timestamp'] > newestDirFile['timestamp']: if newestWebFile['timestamp'] > newestDirFile['timestamp']:
try: try:
if newestDirFile['filename'] != 'placeholder': if newestDirFile['filename'] != 'placeholder':
subprocess.call(["rm", f"{filePath}{newestDirFile['filename']}"]) subprocess.call(["rm", "%s%s" % (filePath, newestDirFile['filename'])])
print("No file found") print("No file found")
print(f"Downloading newest {newestWebFile['filename']} from {url}") print("Downloading newest %s from %s" % (newestWebFile['filename'], url))
else: else:
print("Found newer version of GUI") print("Found newer version of GUI")
print(f"Downloading {newestWebFile['filename']} from {url}") print("Downloading %s from %s" % (newestWebFile['filename'], url))
#=====ATTEMPT DOWNLOAD AND INSTALL========= #=====ATTEMPT DOWNLOAD AND INSTALL=========
subprocess.call(["curl", "-o", f"{filePath}{newestWebFile['filename']}", f"{url}{newestWebFile['filename']}"]) subprocess.call(["curl", "-o", "%s%s" % (filePath, newestWebFile['filename']), "%s%s" % (url, newestWebFile['filename'])])
time.sleep(5) time.sleep(5)
except Exception as e: except Exception as e:
print(f"{e} Download failed. Please try again.") print("%s Download failed. Please try again." % e)
sys.exit(1) sys.exit(1)
try: try:
print("Attempting to extract files") print("Attempting to extract files")
subprocess.call(["tar", "-xf", f"{filePath}{newestWebFile['filename']}", "-C", "/home/lanforge/"]) subprocess.call(["tar", "-xf", "%s%s" % (filePath, newestWebFile['filename']), "-C", "/home/lanforge/"])
except Exception as e: except Exception as e:
print(f"{e}\nExtraction failed. Please try again") print("%s\nExtraction failed. Please try again" % e)
sys.exit(1) sys.exit(1)
#time.sleep(90) #time.sleep(90)
try: try:
if "/home/lanforge/.config/autostart/LANforge-auto.desktop" not in glob.glob("/home/lanforge/.config/autostart/*"): if "/home/lanforge/.config/autostart/LANforge-auto.desktop" not in glob.glob("/home/lanforge/.config/autostart/*"):
print("Copying LANforge-auto.desktop to /home/lanforge/.config/autostart/") print("Copying LANforge-auto.desktop to /home/lanforge/.config/autostart/")
subprocess.call(["cp", f"/home/lanforge/{newestWebFile['filename'][:len(newestWebFile)-18]}/LANforge-auto.desktop", "/home/lanforge/.config/autostart/"]) subprocess.call(["cp", "/home/lanforge/%s/LANforge-auto.desktop" % (newestWebFile['filename'][:len(newestWebFile)-18]), "/home/lanforge/.config/autostart/"])
except Exception as e: except Exception as e:
print(f"{e}\nCopy failed. Please try again") print("%s\nCopy failed. Please try again" % e)
sys.exit(1) sys.exit(1)
try: try:
print(f"Attempting to install {newestWebFile['filename']} at /home/lanforge") print("Attempting to install %s at /home/lanforge" % newestWebFile['filename'])
os.system(f"cd /home/lanforge/{newestWebFile['filename'][:len(newestWebFile)-18]}; sudo bash lfgui_install.bash") os.system("cd /home/lanforge/%s; sudo bash lfgui_install.bash" % (newestWebFile['filename'][:len(newestWebFile)-18]))
except Exception as e: except Exception as e:
print(f"{e}\nInstallation failed. Please Try again.") print("%s\nInstallation failed. Please Try again." % e)
sys.exit(1) sys.exit(1)
#=========ATTEMPT TO RESTART GUI========== #=========ATTEMPT TO RESTART GUI==========
# try: # try:
# print("Killing current GUI process") # print("Killing current GUI process")
# os.system("if pgrep java; then pgrep java | xargs kill -9 ;fi") # os.system("if pgrep java; then pgrep java | xargs kill -9 ;fi")
# except Exception as e: # except Exception as e:
# print(f"{e}\nProcess kill failed. Please try again") # print("%s\nProcess kill failed. Please try again" % e)
# sys.exit(1) # sys.exit(1)
else: else:

View File

@@ -25,11 +25,11 @@ class ConnectTest(LFCliBase):
# compare pre-test values to post-test values # compare pre-test values to post-test values
@staticmethod @staticmethod
def CompareVals(_name, preVal, postVal): def CompareVals(_name, preVal, postVal):
print(f"Comparing {_name}") print("Comparing %s" % _name)
if postVal > preVal: if postVal > preVal:
print(" Test Passed") print(" Test Passed")
else: else:
print(f" Test Failed: {_name} did not increase after 5 seconds") print(" Test Failed: %s did not increase after 5 seconds" % _name)
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")
@@ -108,10 +108,10 @@ class ConnectTest(LFCliBase):
print("Creating endpoints and cross connects") print("Creating endpoints and cross connects")
# create cx for tcp and udp # create cx for tcp and udp
cmd = ( cmd = (
f"./lf_firemod.pl --action create_cx --cx_name testTCP --use_ports {staName},eth1 --use_speeds 360000,150000 --endp_type tcp > ~/Documents/connectTestLogs/connectTestLatest.log") "./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) execWrap(cmd)
cmd = ( cmd = (
f"./lf_firemod.pl --action create_cx --cx_name testUDP --use_ports {staName},eth1 --use_speeds 360000,150000 --endp_type udp >> ~/Documents/connectTestLogs/connectTestLatest.log") "./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) execWrap(cmd)
time.sleep(.05) time.sleep(.05)
@@ -172,7 +172,7 @@ class ConnectTest(LFCliBase):
genl.setFlags("genTest1", "ClearPortOnStart", 1) genl.setFlags("genTest1", "ClearPortOnStart", 1)
genl.setFlags("genTest2", "ClearPortOnStart", 1) genl.setFlags("genTest2", "ClearPortOnStart", 1)
genl.setFlags("genTest2", "Unmanaged", 1) genl.setFlags("genTest2", "Unmanaged", 1)
genl.setCmd("genTest1", f"lfping -i 0.1 -I {staName} 10.40.0.1") genl.setCmd("genTest1", "lfping -i 0.1 -I %s 10.40.0.1" % staName)
time.sleep(.05) time.sleep(.05)
# create generic cx # create generic cx
@@ -276,7 +276,7 @@ class ConnectTest(LFCliBase):
for name in get_info: for name in get_info:
if 'endpoint' not in name: if 'endpoint' not in name:
print(get_info[name]) print(get_info[name])
raise ValueError (f"{name} missing endpoint value") raise ValueError ("%s missing endpoint value" % name)
testTCPATX = get_info['testTCPA']['endpoint']['tx bytes'] testTCPATX = get_info['testTCPA']['endpoint']['tx bytes']
testTCPARX = get_info['testTCPA']['endpoint']['rx bytes'] testTCPARX = get_info['testTCPA']['endpoint']['rx bytes']
@@ -315,7 +315,7 @@ class ConnectTest(LFCliBase):
print("\nStarting CX Traffic") print("\nStarting CX Traffic")
for name in range(len(cxNames)): for name in range(len(cxNames)):
cmd = ( cmd = (
f"./lf_firemod.pl --mgr localhost --quiet yes --action do_cmd --cmd \"set_cx_state default_tm {cxNames[name]} RUNNING\" >> /tmp/connectTest.log") "./lf_firemod.pl --mgr localhost --quiet yes --action do_cmd --cmd \"set_cx_state default_tm %s RUNNING\" >> /tmp/connectTest.log" % (cxNames[name]))
execWrap(cmd) execWrap(cmd)
# print("Sleeping for 5 seconds") # print("Sleeping for 5 seconds")
@@ -327,9 +327,9 @@ class ConnectTest(LFCliBase):
cmd = ( cmd = (
"./lf_portmod.pl --quiet 1 --manager localhost --port_name eth1 --show_port \"Txb,Rxb\" >> ~/Documents/connectTestLogs/connectTestLatest.log") "./lf_portmod.pl --quiet 1 --manager localhost --port_name eth1 --show_port \"Txb,Rxb\" >> ~/Documents/connectTestLogs/connectTestLatest.log")
execWrap(cmd) execWrap(cmd)
os.system(f"echo {staName} >> ~/Documents/connectTestLogs/connectTestLatest.log") os.system("echo %s >> ~/Documents/connectTestLogs/connectTestLatest.log" % staName)
cmd = ( cmd = (
f"./lf_portmod.pl --quiet 1 --manager localhost --port_name {staName} --show_port \"Txb,Rxb\" >> ~/Documents/connectTestLogs/connectTestLatest.log") "./lf_portmod.pl --quiet 1 --manager localhost --port_name %s --show_port \"Txb,Rxb\" >> ~/Documents/connectTestLogs/connectTestLatest.log" % staName)
execWrap(cmd) execWrap(cmd)
# show tx and rx for endpoints PERL # show tx and rx for endpoints PERL
@@ -374,7 +374,7 @@ class ConnectTest(LFCliBase):
print("Stopping CX Traffic") print("Stopping CX Traffic")
for name in range(len(cxNames)): for name in range(len(cxNames)):
cmd = ( cmd = (
f"./lf_firemod.pl --mgr localhost --quiet yes --action do_cmd --cmd \"set_cx_state default_tm {cxNames[name]} STOPPED\" >> /tmp/connectTest.log") "./lf_firemod.pl --mgr localhost --quiet yes --action do_cmd --cmd \"set_cx_state default_tm %s STOPPED\" >> /tmp/connectTest.log" % (cxNames[name]))
execWrap(cmd) execWrap(cmd)
# print("Sleeping for 15 seconds") # print("Sleeping for 15 seconds")
time.sleep(15) time.sleep(15)

View File

@@ -241,7 +241,7 @@ def findPortEids(resource_id=1, base_url="http://localhost:8080", port_names=(),
if base_url.endswith('/'): if base_url.endswith('/'):
port_url = port_url[1:] port_url = port_url[1:]
for port_name in port_names: for port_name in port_names:
url = f"{port_url}/{resource_id}/{port_name}" url = "%s/%s/%s" % (port_url, resource_id, port_name)
lf_r = LFRequest.LFRequest(url) lf_r = LFRequest.LFRequest(url)
try: try:
response = lf_r.getAsJson(debug) response = lf_r.getAsJson(debug)
@@ -263,11 +263,11 @@ def waitUntilPortsAdminDown(resource_id=1, base_url="http://localhost:8080", por
while len(up_stations) > 0: while len(up_stations) > 0:
up_stations = [] up_stations = []
for port_name in port_list: for port_name in port_list:
url = f"{base_url}{port_url}/{resource_id}/{port_name}?fields=device,down" url = "%s%s/%s/%s?fields=device,down" % (base_url, port_url, resource_id, port_name)
lf_r = LFRequest.LFRequest(url) lf_r = LFRequest.LFRequest(url)
json_response = lf_r.getAsJson(show_error=False) json_response = lf_r.getAsJson(show_error=False)
if json_response == None: if json_response == None:
print(f"port {port_name} disappeared") print("port %s disappeared" % port_name)
continue continue
if "interface" in json_response: if "interface" in json_response:
json_response = json_response['interface'] json_response = json_response['interface']
@@ -288,7 +288,7 @@ def waitUntilPortsAdminUp(resource_id=1, base_url="http://localhost:8080", port_
while len(down_stations) > 0: while len(down_stations) > 0:
down_stations = [] down_stations = []
for port_name in port_list: for port_name in port_list:
url = f"{base_url}{port_url}/{resource_id}/{port_name}?fields=device,down" url = "%s%s/%s/%s?fields=device,down" % (base_url, port_url, resource_id, port_name)
lf_r = LFRequest.LFRequest(url) lf_r = LFRequest.LFRequest(url)
json_response = lf_r.getAsJson(show_error=False) json_response = lf_r.getAsJson(show_error=False)
if json_response == None: if json_response == None:
@@ -314,7 +314,7 @@ def waitUntilPortsDisappear(resource_id=1, base_url="http://localhost:8080", por
found_stations = [] found_stations = []
sleep(1) sleep(1)
for port_name in port_list: for port_name in port_list:
check_url = f"{base_url}{url}/{resource_id}/{port_name}" check_url = "%s%s/%s/%s" % (base_url, url, resource_id, port_name)
if debug: if debug:
print("checking:"+check_url) print("checking:"+check_url)
lf_r = LFRequest.LFRequest(check_url) lf_r = LFRequest.LFRequest(check_url)
@@ -339,13 +339,13 @@ def waitUntilPortsAppear(resource_id=1, base_url="http://localhost:8080", port_l
found_stations = [] found_stations = []
for port_name in port_list: for port_name in port_list:
sleep(1) sleep(1)
url = f"{base_url}{port_url}/{resource_id}/{port_name}" url = "%s/%s/%s" % (base_url, port_url, resource_id, port_name)
lf_r = LFRequest.LFRequest(url) lf_r = LFRequest.LFRequest(url)
json_response = lf_r.getAsJson(show_error=False) json_response = lf_r.getAsJson(show_error=False)
if (json_response != None): if (json_response != None):
found_stations.append(port_name) found_stations.append(port_name)
else: else:
lf_r = LFRequest.LFRequest(f"{base_url}{ncshow_url}") lf_r = LFRequest.LFRequest("%s%s" % (base_url, ncshow_url))
lf_r.addPostData({"shelf": 1, "resource": resource_id, "port": port_name, "flags": 1}) lf_r.addPostData({"shelf": 1, "resource": resource_id, "port": port_name, "flags": 1})
lf_r.formPost() lf_r.formPost()
sleep(2) sleep(2)

View File

@@ -13,7 +13,7 @@ from LANforge.lfcli_base import LFCliBase
class Realm(LFCliBase): class Realm(LFCliBase):
def __init__(self, lfclient_host="localhost", lfclient_port=8080, debug=False): def __init__(self, lfclient_host="localhost", lfclient_port=8080, debug=False):
super().__init__(lfclient_host, lfclient_port, debug, _halt_on_error=True) super().__init__(lfclient_host, lfclient_port, debug, _halt_on_error=True)
self.lfclient_url = f"http://{lfclient_host}:{lfclient_port}" self.lfclient_url = "http://%s:%s" % (lfclient_host, lfclient_port)
super().check_connect() super().check_connect()
@@ -69,14 +69,14 @@ class Realm(LFCliBase):
# removes port by eid/eidpn # removes port by eid/eidpn
def removeVlanByEid(self, eid): def removeVlanByEid(self, eid):
if (eid is None) or ("" == eid): if (eid is None) or ("" == eid):
raise ValueError(f"removeVlanByEid wants eid like 1.1.sta0 but given[{eid}]") raise ValueError("removeVlanByEid wants eid like 1.1.sta0 but given[%s]" % eid)
hunks = eid.split('.') hunks = eid.split('.')
#print("- - - - - - - - - - - - - - - - -") #print("- - - - - - - - - - - - - - - - -")
#pprint(hunks) #pprint(hunks)
#pprint(self.lfclient_url) #pprint(self.lfclient_url)
#print("- - - - - - - - - - - - - - - - -") #print("- - - - - - - - - - - - - - - - -")
if (len(hunks) > 3) or (len(hunks) < 2): if (len(hunks) > 3) or (len(hunks) < 2):
raise ValueError(f"removeVlanByEid wants eid like 1.1.sta0 but given[{eid}]") raise ValueError("removeVlanByEid wants eid like 1.1.sta0 but given[%s]" % eid)
elif len(hunks) == 3: elif len(hunks) == 3:
LFUtils.removePort(hunks[1], hunks[2], self.lfclient_url) LFUtils.removePort(hunks[1], hunks[2], self.lfclient_url)
else: else:
@@ -130,7 +130,7 @@ class Realm(LFCliBase):
if port_eid.find(prefix) >= 0: if port_eid.find(prefix) >= 0:
port_suf = record["device"][len(prefix):] port_suf = record["device"][len(prefix):]
if (port_suf >= match.group(2)) and (port_suf <= match.group(3)): if (port_suf >= match.group(2)) and (port_suf <= match.group(3)):
#print(f"{port_name}: suffix[{port_name}] between {match.group(2)}:{match.group(3)}") #print("%s: suffix[%s] between %s:%s" % (port_name, port_name, match.group(2), match.group(3))
matched_map[port_eid] = record matched_map[port_eid] = record
except ValueError as e: except ValueError as e:
super().error(e) super().error(e)
@@ -147,7 +147,7 @@ class Realm(LFCliBase):
class CXProfile: class CXProfile:
def __init__(self, lfclient_host, lfclient_port, debug=False): def __init__(self, lfclient_host, lfclient_port, debug=False):
self.lfclient_url = f"http://{lfclient_host}:{lfclient_port}/" self.lfclient_url = "http://%s:%s/" % (lfclient_host, lfclient_port)
self.debug = debug self.debug = debug
self.post_data = [] self.post_data = []
@@ -281,7 +281,7 @@ class StationProfile:
if (param_name is None) or (param_name == ""): if (param_name is None) or (param_name == ""):
return return
if command_name not in self.COMMANDS: if command_name not in self.COMMANDS:
super().error(f"Command name name [{command_name}] not defined in {self.COMMANDS}") super().error("Command name name [%s] not defined in %s" % (command_name, self.COMMANDS))
return return
if command_name == "add_sta": if command_name == "add_sta":
self.add_sta_data[param_name] = param_value self.add_sta_data[param_name] = param_value
@@ -295,11 +295,11 @@ class StationProfile:
if (param_name is None) or (param_name == ""): if (param_name is None) or (param_name == ""):
return return
if command_name not in self.COMMANDS: if command_name not in self.COMMANDS:
print(f"Command name name [{command_name}] not defined in {self.COMMANDS}") print("Command name name [%s] not defined in %s" % (command_name, self.COMMANDS))
return return
if command_name == "add_sta": if command_name == "add_sta":
if (param_name not in add_sta.add_sta_flags) and (param_name not in add_sta.add_sta_modes): if (param_name not in add_sta.add_sta_flags) and (param_name not in add_sta.add_sta_modes):
print(f"Parameter name [{param_name}] not defined in add_sta.py") print("Parameter name [%s] not defined in add_sta.py" % param_name)
if self.debug: if self.debug:
pprint(add_sta.add_sta_flags) pprint(add_sta.add_sta_flags)
return return
@@ -310,7 +310,7 @@ class StationProfile:
elif command_name == "set_port": elif command_name == "set_port":
if (param_name not in set_port.set_port_current_flags) and (param_name not in set_port.set_port_cmd_flags): if (param_name not in set_port.set_port_current_flags) and (param_name not in set_port.set_port_cmd_flags):
print(f"Parameter name [{param_name}] not defined in set_port.py") print("Parameter name [%s] not defined in set_port.py" % param_name)
if self.debug: if self.debug:
pprint(set_port.set_port_cmd_flags) pprint(set_port.set_port_cmd_flags)
pprint(set_port.set_port_current_flags) pprint(set_port.set_port_current_flags)
@@ -353,10 +353,10 @@ class StationProfile:
v = int(self.prefix, 10) v = int(self.prefix, 10)
if v > 0: if v > 0:
num += v num += v
template = f"sta%0{wd}d" template = "sta%0%sd" % wd
name = template % num name = template % num
#if self.debug: #if self.debug:
# print(f"XXXXXXXXXXX {name} XXXXXXXXXXXXXXX") # print("XXXXXXXXXXX %s XXXXXXXXXXXXXXX" % name)
return name return name
# Checks for errors in initialization values and creates specified number of stations using init parameters # Checks for errors in initialization values and creates specified number of stations using init parameters
@@ -366,7 +366,7 @@ class StationProfile:
# name = resource_radio[resource_radio.index(".") + 1:] # name = resource_radio[resource_radio.index(".") + 1:]
# if name.index(".") >= 0: # if name.index(".") >= 0:
# radio_name = name[name.index(".")+1 : ] # radio_name = name[name.index(".")+1 : ]
# print(f"Building {num_stations} on radio {resource}.{radio_name}") # print("Building %s on radio %s.%s" % (num_stations, resource, radio_name))
# except ValueError as e: # except ValueError as e:
# print(e) # print(e)
@@ -387,7 +387,7 @@ class StationProfile:
self.set_port_data["port"] = sta_name self.set_port_data["port"] = sta_name
sta_names.append(sta_name) sta_names.append(sta_name)
if debug: if debug:
print(f"- 381 - {sta_name}- - - - - - - - - - - - - - - - - - ") print("- 381 - %s- - - - - - - - - - - - - - - - - - "% sta_name)
pprint(self.add_sta_data) pprint(self.add_sta_data)
pprint(self.set_port_data) pprint(self.set_port_data)
print("- ~381 - - - - - - - - - - - - - - - - - - - ") print("- ~381 - - - - - - - - - - - - - - - - - - - ")
@@ -410,6 +410,6 @@ class StationProfile:
json_response = set_port_r.jsonPost(debug) json_response = set_port_r.jsonPost(debug)
time.sleep(0.03) time.sleep(0.03)
print(f"created {num} stations") print("created %s stations" % num)
# #

View File

@@ -12,11 +12,11 @@ localrealm = Realm("localhost", 8080, True)
print("** Existing Stations **") print("** Existing Stations **")
try: try:
sta_list = localrealm.station_list() sta_list = localrealm.station_list()
print(f"\n{len(sta_list)} Station List:") print("\n%s Station List:" % len(sta_list))
print(sta_list) print(sta_list)
del sta_list del sta_list
sta_map = localrealm.station_map() sta_map = localrealm.station_map()
print(f"\n{len(sta_map)} Station Map:") print("\n Station Map:" % len(sta_map))
print(sta_map) print(sta_map)
del sta_map del sta_map
print("\n Stations like wlan+:") print("\n Stations like wlan+:")
@@ -60,7 +60,7 @@ profile.build(1, "wiphy0", 5)
try: try:
sta_list = localrealm.station_list() sta_list = localrealm.station_list()
print(f"{len(sta_list)} Stations:") print("%s Stations:" % {len(sta_list)})
pprint(sta_list) pprint(sta_list)
print(" Stations like sta+:") print(" Stations like sta+:")
print(localrealm.find_ports_like("wlan+")) print(localrealm.find_ports_like("wlan+"))
@@ -78,7 +78,7 @@ exit(0)
print("** Existing vAPs **") print("** Existing vAPs **")
try: try:
vap_list = localrealm.vap_list() vap_list = localrealm.vap_list()
print(f"{len(vap_list)} VAPs:") print("%s VAPs:" % len(vap_list))
pprint(vap_list) pprint(vap_list)
except Exception as x: except Exception as x:
localrealm.error(x) localrealm.error(x)
@@ -87,7 +87,7 @@ except Exception as x:
print("** Existing CXs **") print("** Existing CXs **")
try: try:
cx_list = localrealm.cx_list() cx_list = localrealm.cx_list()
print(f"{len(cx_list)} CXs:") print("%s CXs:" % len(cx_list))
pprint(cx_list) pprint(cx_list)
except Exception as x: except Exception as x:
localrealm.error(x) localrealm.error(x)