mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 18:58:01 +00:00 
			
		
		
		
	bands mode with multiple ssid added
This commit is contained in:
		| @@ -40,6 +40,12 @@ class ThroughputQOS(Realm): | |||||||
|                  ssid=None, |                  ssid=None, | ||||||
|                  security=None, |                  security=None, | ||||||
|                  password=None, |                  password=None, | ||||||
|  |                  ssid_2g=None, | ||||||
|  |                  security_2g=None, | ||||||
|  |                  password_2g=None, | ||||||
|  |                  ssid_5g=None, | ||||||
|  |                  security_5g=None, | ||||||
|  |                  password_5g=None, | ||||||
|                  sta_list=[], |                  sta_list=[], | ||||||
|                  create_sta=True, |                  create_sta=True, | ||||||
|                  name_prefix=None, |                  name_prefix=None, | ||||||
| @@ -65,11 +71,17 @@ class ThroughputQOS(Realm): | |||||||
|         self.host = host |         self.host = host | ||||||
|         self.port = port |         self.port = port | ||||||
|         self.ssid = ssid |         self.ssid = ssid | ||||||
|         self.sta_list = sta_list |  | ||||||
|         self.create_sta = create_sta |  | ||||||
|         self.security = security |         self.security = security | ||||||
|         self.password = password |         self.password = password | ||||||
|  |         self.ssid_2g = ssid_2g | ||||||
|  |         self.security_2g = security_2g | ||||||
|  |         self.password_2g = password_2g | ||||||
|  |         self.ssid_5g = ssid_5g | ||||||
|  |         self.security_5g = security_5g | ||||||
|  |         self.password_5g = password_5g | ||||||
|         self.radio = radio.split(",") |         self.radio = radio.split(",") | ||||||
|  |         self.sta_list = sta_list | ||||||
|  |         self.create_sta = create_sta | ||||||
|         self.mode = mode |         self.mode = mode | ||||||
|         self.ap = ap |         self.ap = ap | ||||||
|         self.traffic_type = traffic_type |         self.traffic_type = traffic_type | ||||||
| @@ -133,6 +145,17 @@ class ThroughputQOS(Realm): | |||||||
|     def build(self): |     def build(self): | ||||||
|         for key in self.bands: |         for key in self.bands: | ||||||
|             if self.create_sta: |             if self.create_sta: | ||||||
|  |                 if key == "2.4G" or key == "2,4g": | ||||||
|  |                     if self.ssid is None: | ||||||
|  |                         self.station_profile.use_security(self.security_2g, self.ssid_2g, self.password_2g) | ||||||
|  |                     else: | ||||||
|  |                         self.station_profile.use_security(self.security, self.ssid, self.password) | ||||||
|  |                 elif key == "5G" or key == "5G": | ||||||
|  |                     if self.ssid is None: | ||||||
|  |                         self.station_profile.use_security(self.security_5g, self.ssid_5g, self.password_5g) | ||||||
|  |                     else: | ||||||
|  |                         self.station_profile.use_security(self.security, self.ssid, self.password) | ||||||
|  |                 else: | ||||||
|                     self.station_profile.use_security(self.security, self.ssid, self.password) |                     self.station_profile.use_security(self.security, self.ssid, self.password) | ||||||
|                 self.station_profile.set_number_template(self.number_template) |                 self.station_profile.set_number_template(self.number_template) | ||||||
|                 print("Creating stations") |                 print("Creating stations") | ||||||
| @@ -140,10 +163,12 @@ class ThroughputQOS(Realm): | |||||||
|                 self.station_profile.set_command_param("set_port", "report_timer", 1500) |                 self.station_profile.set_command_param("set_port", "report_timer", 1500) | ||||||
|                 self.station_profile.set_command_flag("set_port", "rpt_timer", 1) |                 self.station_profile.set_command_flag("set_port", "rpt_timer", 1) | ||||||
|                 if key == "BOTH" or key == "both": |                 if key == "BOTH" or key == "both": | ||||||
|  |                     if (self.ssid is None) and (self.password is None) and (self.security is None): | ||||||
|  |                         self.station_profile.use_security(self.security_2g, self.ssid_2g, self.password_2g) | ||||||
|                     split = len(self.sta_list) // 2 |                     split = len(self.sta_list) // 2 | ||||||
|                     self.station_profile.mode = 9 |                     self.station_profile.mode = 2 | ||||||
|                     self.station_profile.create(radio=self.radio[0], sta_names_=self.sta_list[:split], debug=self.debug) |                     self.station_profile.create(radio=self.radio[0], sta_names_=self.sta_list[:split], debug=self.debug) | ||||||
|                     self.station_profile.mode = 11 |                     self.station_profile.mode = 9 | ||||||
|                     self.station_profile.create(radio=self.radio[1], sta_names_=self.sta_list[split:], debug=self.debug) |                     self.station_profile.create(radio=self.radio[1], sta_names_=self.sta_list[split:], debug=self.debug) | ||||||
|                 else: |                 else: | ||||||
|                     self.station_profile.create(radio=self.radio[0], sta_names_=self.sta_list, debug=self.debug) |                     self.station_profile.create(radio=self.radio[0], sta_names_=self.sta_list, debug=self.debug) | ||||||
| @@ -258,13 +283,22 @@ python3 ./throughput_QOS.py | |||||||
|                         default="Best Effort") |                         default="Best Effort") | ||||||
|     parser.add_argument('--bands', help='used to run on multiple radio bands,can be used with multiple stations', |     parser.add_argument('--bands', help='used to run on multiple radio bands,can be used with multiple stations', | ||||||
|                         default="2,4G, 5G, BOTH") |                         default="2,4G, 5G, BOTH") | ||||||
|  |     parser.add_argument('--ssid_2g', help="ssid for  2.4Ghz band") | ||||||
|  |     parser.add_argument('--security_2g', help="security type for  2.4Ghz band") | ||||||
|  |     parser.add_argument('--passwd_2g', help="password for 2.4Ghz band") | ||||||
|  |     parser.add_argument('--ssid_5g', help="ssid for  5Ghz band") | ||||||
|  |     parser.add_argument('--security_5g', help="security type  for  5Ghz band") | ||||||
|  |     parser.add_argument('--passwd_5g', help="password for  5Ghz band") | ||||||
|     args = parser.parse_args() |     args = parser.parse_args() | ||||||
|     print("--------------------------------------------") |     print("--------------------------------------------") | ||||||
|     print(args) |     print(args) | ||||||
|     print("--------------------------------------------") |     print("--------------------------------------------") | ||||||
|     test_results = [] |     test_results = [] | ||||||
|     test_cases = {} |     test_cases = {} | ||||||
|  |     if (args.a_min is not None) and (args.b_min is not None): | ||||||
|  |         args.a_min = args.a_min.split(',') | ||||||
|  |         args.b_min = args.b_min.split(',') | ||||||
|  |         loads = {"a_min": args.a_min, "b_min": args.b_min} | ||||||
|     if args.bands is not None: |     if args.bands is not None: | ||||||
|         bands = args.bands.split(',') |         bands = args.bands.split(',') | ||||||
|  |  | ||||||
| @@ -322,7 +356,7 @@ python3 ./throughput_QOS.py | |||||||
|         print(args.mode) |         print(args.mode) | ||||||
|         print(station_list) |         print(station_list) | ||||||
|         print("-----------------") |         print("-----------------") | ||||||
|  |         for index in range(len(loads["a_min"])): | ||||||
|             throughput_qos = ThroughputQOS(host=args.mgr, |             throughput_qos = ThroughputQOS(host=args.mgr, | ||||||
|                                            port=args.mgr_port, |                                            port=args.mgr_port, | ||||||
|                                            number_template="0000", |                                            number_template="0000", | ||||||
| @@ -332,12 +366,18 @@ python3 ./throughput_QOS.py | |||||||
|                                            upstream=args.upstream_port, |                                            upstream=args.upstream_port, | ||||||
|                                            ssid=args.ssid, |                                            ssid=args.ssid, | ||||||
|                                            password=args.passwd, |                                            password=args.passwd, | ||||||
|                                        radio=args.radio, |  | ||||||
|                                            security=args.security, |                                            security=args.security, | ||||||
|  |                                            ssid_2g=args.ssid_2g, | ||||||
|  |                                            password_2g=args.passwd_2g, | ||||||
|  |                                            security_2g=args.security_2g, | ||||||
|  |                                            ssid_5g=args.ssid_5g, | ||||||
|  |                                            password_5g=args.passwd_5g, | ||||||
|  |                                            security_5g=args.security_5g, | ||||||
|  |                                            radio=args.radio, | ||||||
|                                            test_duration=args.test_duration, |                                            test_duration=args.test_duration, | ||||||
|                                            use_ht160=False, |                                            use_ht160=False, | ||||||
|                                        side_a_min_rate=args.a_min, |                                            side_a_min_rate=loads['a_min'][index], | ||||||
|                                        side_b_min_rate=args.b_min, |                                            side_b_min_rate=loads['b_min'][index], | ||||||
|                                            mode=args.mode, |                                            mode=args.mode, | ||||||
|                                            bands=args.bands, |                                            bands=args.bands, | ||||||
|                                            ap=args.ap, |                                            ap=args.ap, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 anil-tegala
					anil-tegala