mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 02:38:03 +00:00 
			
		
		
		
	endpoint id (eid) now supports greater than values.
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
		| @@ -121,7 +121,8 @@ class FIOEndpProfile(LFCliBase): | ||||
|         cx_post_data = [] | ||||
|         for port_name in ports: | ||||
|             for num_connection in range(connections_per_port): | ||||
|                 if len(self.local_realm.name_to_eid(port_name)) == 3: | ||||
|                 #  | ||||
|                 if len(self.local_realm.name_to_eid(port_name)) >= 3: | ||||
|                     shelf = self.local_realm.name_to_eid(port_name)[0] | ||||
|                     resource = self.local_realm.name_to_eid(port_name)[1] | ||||
|                     name = self.local_realm.name_to_eid(port_name)[2] | ||||
| @@ -168,7 +169,7 @@ class FIOEndpProfile(LFCliBase): | ||||
|         self.local_realm.json_post("/cli-json/nc_show_endpoints", {"endpoint": "all"}) | ||||
|         for port_name in ports: | ||||
|             for num_connection in range(connections_per_port): | ||||
|                 if len(self.local_realm.name_to_eid(port_name)) == 3: | ||||
|                 if len(self.local_realm.name_to_eid(port_name)) >= 3: | ||||
|                     shelf = self.local_realm.name_to_eid(port_name)[0] | ||||
|                     resource = self.local_realm.name_to_eid(port_name)[1] | ||||
|                     name = self.local_realm.name_to_eid(port_name)[2] | ||||
|   | ||||
| @@ -110,7 +110,7 @@ class HTTPProfile(LFCliBase): | ||||
|             if (ip_addr is None) or (ip_addr == ""): | ||||
|                 raise ValueError("HTTPProfile::create encountered blank ip/hostname") | ||||
|  | ||||
|             if len(self.local_realm.name_to_eid(port_name)) == 3: | ||||
|             if len(self.local_realm.name_to_eid(port_name)) >= 3: | ||||
|                 shelf = self.local_realm.name_to_eid(port_name)[0] | ||||
|                 resource = self.local_realm.name_to_eid(port_name)[1] | ||||
|                 name = self.local_realm.name_to_eid(port_name)[2] | ||||
|   | ||||
| @@ -110,10 +110,11 @@ class L4CXProfile(LFCliBase): | ||||
|     def create(self, ports=[], sleep_time=.5, debug_=False, suppress_related_commands_=None): | ||||
|         cx_post_data = [] | ||||
|         for port_name in ports: | ||||
|             if len(self.local_realm.name_to_eid(port_name)) == 3: | ||||
|                 shelf = self.local_realm.name_to_eid(port_name)[0] | ||||
|                 resource = self.local_realm.name_to_eid(port_name)[1] | ||||
|                 name = self.local_realm.name_to_eid(port_name)[2] | ||||
|             print("port_name: {} len: {} self.local_realm.name_to_eid(port_name): {}".format(port_name,len(self.local_realm.name_to_eid(port_name)),self.local_realm.name_to_eid(port_name),)) | ||||
|             if len(self.local_realm.name_to_eid(port_name)) >= 3: | ||||
|                     shelf = self.local_realm.name_to_eid(port_name)[0] | ||||
|                     resource = self.local_realm.name_to_eid(port_name)[1] | ||||
|                     name = self.local_realm.name_to_eid(port_name)[2] | ||||
|             else: | ||||
|                 raise ValueError("Unexpected name for port_name %s" % port_name) | ||||
|             endp_data = { | ||||
|   | ||||
| @@ -9,8 +9,14 @@ PURPOSE: | ||||
|     find out download/upload time of each client according to file size. | ||||
|     This script will monitor the bytes-rd attribute of the endpoints. | ||||
|  | ||||
| USE:  './ftp_test.py --ssid "jedway-wap2-x2048-5-3" --passwd "jedway-wpa2-x2048-5-3" --security wpa2 --bands "5G" --direction "Download" \ | ||||
|     --file_size "2MB" --num_stations | ||||
| SETUP:   | ||||
|  | ||||
|     Create a file to be downloaded    linux:  fallocate -l <size> <name>    example fallocate -l 2M ftp_test.txt | ||||
|  | ||||
|  | ||||
| EXAMPLE:   | ||||
|     './ftp_test.py --ssid "jedway-wap2-x2048-5-3" --passwd "jedway-wpa2-x2048-5-3" --security wpa2 --bands "5G" --direction "Download" \ | ||||
|     --file_size "2MB" --num_stations 2 | ||||
|  | ||||
| INCLUDE_IN_README | ||||
|  | ||||
| @@ -19,7 +25,6 @@ INCLUDE_IN_README | ||||
|     Copyright 2021 Candela Technologies Inc | ||||
|     License: Free to distribute and modify. LANforge systems must be licensed. | ||||
|  | ||||
| SETUP:  Create a file to be downloaded    linux:  fallocate -l <size> <name>    example fallocate -l 2M ftp_test.txt | ||||
| """ | ||||
| import sys | ||||
| from ftp_html import * | ||||
| @@ -40,7 +45,7 @@ import time | ||||
| import os | ||||
|  | ||||
| class ftp_test(LFCliBase): | ||||
|     def __init__(self, lfclient_host="localhost", lfclient_port=8080, sta_prefix="sta", start_id=0, num_sta= None, | ||||
|     def __init__(self, lfclient_host="localhost", lfclient_port=8080, radio = "wiphy0", sta_prefix="sta", start_id=0, num_sta= None, | ||||
|                  dut_ssid=None,dut_security=None, dut_passwd=None, file_size=None, band=None, | ||||
|                  upstream="eth1",_debug_on=False, _exit_on_error=False,  _exit_on_fail=False, direction= None): | ||||
|         super().__init__(lfclient_host, lfclient_port, _debug=_debug_on, _exit_on_fail=_exit_on_fail) | ||||
| @@ -447,7 +452,7 @@ def main(): | ||||
|     parser.add_argument('--ssid',type=str, help='--ssid', default="TestAP-Jitendra") | ||||
|     parser.add_argument('--passwd',type=str, help='--passwd', default="BLANK") | ||||
|     parser.add_argument('--security', type=str, help='--security', default="open") | ||||
|     #parser.add_argument('--radios',nargs="+",help='--radio to use on LANforge for 5G and 2G', default=["wiphy0","wiphy1"]) | ||||
|     parser.add_argument('--radios',nargs="+",help='--radio to use on LANforge for 5G and 2G', default=["wiphy0"]) | ||||
|      | ||||
|     # Test variables | ||||
|     parser.add_argument('--bands', nargs="+", help='--bands defaults ["5G","2.4G","Both"]', default=["5G","2.4G","Both"]) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Chuck SmileyRekiere
					Chuck SmileyRekiere