mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 18:58:01 +00:00 
			
		
		
		
	LFUtils.py: fixes json-post for waiting on ports
This commit is contained in:
		| @@ -414,7 +414,7 @@ def wait_until_ports_appear(base_url="http://localhost:8080", port_list=(), debu | |||||||
|     print("Waiting until ports appear...") |     print("Waiting until ports appear...") | ||||||
|     found_stations = [] |     found_stations = [] | ||||||
|     port_url = "/port/1" |     port_url = "/port/1" | ||||||
|     ncshow_url = "/cli-form/nc_show_ports" |     ncshow_url = "/cli-json/nc_show_ports" | ||||||
|     if base_url.endswith('/'): |     if base_url.endswith('/'): | ||||||
|         port_url = port_url[1:] |         port_url = port_url[1:] | ||||||
|         ncshow_url = ncshow_url[1:] |         ncshow_url = ncshow_url[1:] | ||||||
| @@ -434,7 +434,7 @@ def wait_until_ports_appear(base_url="http://localhost:8080", port_list=(), debu | |||||||
|                 found_stations.append(port_name) |                 found_stations.append(port_name) | ||||||
|             else: |             else: | ||||||
|                 lf_r = LFRequest.LFRequest(base_url, ncshow_url) |                 lf_r = LFRequest.LFRequest(base_url, ncshow_url) | ||||||
|                 lf_r.addPostData({"shelf": shelf, "resource": resource_id, "port": port_name, "flags": "1"}) |                 lf_r.addPostData({"shelf": shelf, "resource": resource_id, "port": port_name, "probe_flags": "1"}) | ||||||
|                 lf_r.jsonPost() |                 lf_r.jsonPost() | ||||||
|         if (len(found_stations) < len(port_list)): |         if (len(found_stations) < len(port_list)): | ||||||
|             sleep(2) |             sleep(2) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jed Reynolds
					Jed Reynolds