From 75a1f8ea4ebc3cdf2c7de9583bcb2dd48833a08a Mon Sep 17 00:00:00 2001 From: Logan Lipke Date: Tue, 2 Jun 2020 14:41:59 -0700 Subject: [PATCH] Suppressed repetitive output during test --- connectTest.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/connectTest.py b/connectTest.py index 0e9e8a77..dd0f4d33 100755 --- a/connectTest.py +++ b/connectTest.py @@ -33,7 +33,7 @@ def jsonReq(mgrURL, reqURL, data, exitWhenCalled=False): print("jsonReq: bye") sys.exit(1) else: - lf_r.jsonPost(False) # False means don't print info on errors + lf_r.jsonPost(exitWhenCalled) def getJsonInfo(mgrURL, reqURL, debug=False): lf_r = LFRequest.LFRequest(mgrURL + reqURL) @@ -50,7 +50,7 @@ print("Checking for LANforge Client") response = getJsonInfo(mgrURL, 'port/1/1/wiphy0') duration = 0 while ((response == None) and (duration < 300)): - print("LANforge Client not found sleeping 5 seconds") + #print("LANforge Client not found sleeping 5 seconds") duration += 2 time.sleep(2) response = getJsonInfo(mgrURL, 'port/1/1/wiphy0') @@ -70,7 +70,7 @@ response = getJsonInfo(mgrURL, url) if (response is not None): if (response["interface"] is not None): print("removing old station") - LFUtils.removePort("1", "sta00000", mgrURL) + LFUtils.removePortByName("1.1.sta00000", mgrURL) time.sleep(1) url = "cli-json/add_sta" @@ -131,7 +131,7 @@ while ((ip == "0.0.0.0") and (duration < maxTime)): if duration >= maxTime: print("sta00000 failed to get an ip. Ending test") print("Cleaning up...") - removePort("1", "sta00000", mgrURL) + removePort(1,"sta00000", mgrURL) sys.exit(1) @@ -338,7 +338,7 @@ except Exception as e: print("Something went wrong") print(e) print("Cleaning up...") - LFUtils.removePort("1", "sta00000", mgrURL) + LFUtils.removePort(1,"sta00000", mgrURL) endpNames = ["testTCP-A", "testTCP-B", "testUDP-A", "testUDP-B", @@ -504,7 +504,7 @@ print("\n") #remove all endpoints and cxs print("Cleaning up...") -LFUtils.removePort("1", "sta00000", mgrURL) +LFUtils.removePort(1,"sta00000", mgrURL) endpNames = ["testTCP-A", "testTCP-B", "testUDP-A", "testUDP-B",