mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 18:58:01 +00:00 
			
		
		
		
	run_cv_scenario: Remove unused variable names
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
		| @@ -58,6 +58,7 @@ class RunCvScenario(LFCliBase): | |||||||
|  |  | ||||||
|         port_counter = 0 |         port_counter = 0 | ||||||
|         attempts = 6 |         attempts = 6 | ||||||
|  |         alias_map = None | ||||||
|         while (attempts > 0) and (port_counter > 0): |         while (attempts > 0) and (port_counter > 0): | ||||||
|             sleep(1) |             sleep(1) | ||||||
|             attempts -= 1 |             attempts -= 1 | ||||||
| @@ -74,7 +75,7 @@ class RunCvScenario(LFCliBase): | |||||||
|  |  | ||||||
|         if (port_counter != 0) and (attempts == 0): |         if (port_counter != 0) and (attempts == 0): | ||||||
|             print("There appears to be a vAP in this database, quitting.") |             print("There appears to be a vAP in this database, quitting.") | ||||||
|             pprint(alias_map) |             pprint.pprint(alias_map) | ||||||
|             exit(1) |             exit(1) | ||||||
|  |  | ||||||
|         data = { |         data = { | ||||||
| @@ -147,14 +148,12 @@ class RunCvScenario(LFCliBase): | |||||||
|             sleep(1) |             sleep(1) | ||||||
|             if time.time() > (begin_time + (6 * 1000)): |             if time.time() > (begin_time + (6 * 1000)): | ||||||
|                 print("waited %d sec for text blobs to update" % self.load_timeout_sec) |                 print("waited %d sec for text blobs to update" % self.load_timeout_sec) | ||||||
|                 load_completed = True |  | ||||||
|                 break |                 break | ||||||
|             status_response = self.json_get("/") |             status_response = self.json_get("/") | ||||||
|             if "text_records_last_updated_ms" in status_response: |             if "text_records_last_updated_ms" in status_response: | ||||||
|                 updated = int(status_response["text_records_last_updated_ms"]) |                 updated = int(status_response["text_records_last_updated_ms"]) | ||||||
|                 print(", , , , , , , , , updated at %d" % updated) |                 print(", , , , , , , , , updated at %d" % updated) | ||||||
|                 if updated > blobs_last_updated: |                 if updated > blobs_last_updated: | ||||||
|                     load_completed = True |  | ||||||
|                     break |                     break | ||||||
|             else: |             else: | ||||||
|                 pprint.pprint(status_response) |                 pprint.pprint(status_response) | ||||||
| @@ -162,7 +161,7 @@ class RunCvScenario(LFCliBase): | |||||||
|                 "type": "ALL", |                 "type": "ALL", | ||||||
|                 "name": "ALL" |                 "name": "ALL" | ||||||
|             }) |             }) | ||||||
|         delta: int = (time.time() * 1000) - begin_time |         delta: float = (time.time() * 1000) - begin_time | ||||||
|         print("blobs loaded in %d ms" % delta) |         print("blobs loaded in %d ms" % delta) | ||||||
|  |  | ||||||
|         # next show duts |         # next show duts | ||||||
| @@ -201,7 +200,6 @@ class RunCvScenario(LFCliBase): | |||||||
|             "sleep 1", |             "sleep 1", | ||||||
|             "exit" |             "exit" | ||||||
|         ] |         ] | ||||||
|         response_json = [] |  | ||||||
|         for command in commands: |         for command in commands: | ||||||
|             data = { |             data = { | ||||||
|                 "cmd": command |                 "cmd": command | ||||||
| @@ -231,7 +229,7 @@ class RunCvScenario(LFCliBase): | |||||||
|                 else: |                 else: | ||||||
|                     response_json = [] |                     response_json = [] | ||||||
|                     print("running %s..." % command, end='') |                     print("running %s..." % command, end='') | ||||||
|                     response = self.json_post("/gui-json/cmd%s" % debug_par, data, debug_=False, |                     self.json_post("/gui-json/cmd%s" % debug_par, data, debug_=False, | ||||||
|                                    response_json_list_=response_json) |                                    response_json_list_=response_json) | ||||||
|                     if debug_: |                     if debug_: | ||||||
|                         LFUtils.debug_printer.pprint(response_json) |                         LFUtils.debug_printer.pprint(response_json) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Matthew Stidham
					Matthew Stidham