mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-03 12:18:00 +00:00 
			
		
		
		
	multiple stations list with multiple speeds added
This commit is contained in:
		@@ -179,14 +179,14 @@ class ThroughputQOS(Realm):
 | 
			
		||||
                    data = list(self.json_get('/cx/%s?fields=bps+rx+a,bps+rx+b' % sta).values())[2]
 | 
			
		||||
                    tos_upload['_video'].append(data['bps rx a'])
 | 
			
		||||
                    tos_download['_video'].append(data['bps rx b'])
 | 
			
		||||
            tos_upload.update({"_video" : sum(tos_upload['_video'])})
 | 
			
		||||
            tos_upload.update({"_voice": sum(tos_upload['_voice'])})
 | 
			
		||||
            tos_upload.update({"_bk": sum(tos_upload['_bk'])})
 | 
			
		||||
            tos_upload.update({"_be": sum(tos_upload['_be'])})
 | 
			
		||||
            tos_download.update({"_video": sum(tos_download['_video'])})
 | 
			
		||||
            tos_download.update({"_voice": sum(tos_download['_voice'])})
 | 
			
		||||
            tos_download.update({"_bk": sum(tos_download['_bk'])})
 | 
			
		||||
            tos_download.update({"_be": sum(tos_download['_be'])})
 | 
			
		||||
            tos_upload.update({"_videoQOS": sum(tos_upload['_video'])})
 | 
			
		||||
            tos_upload.update({"_voiceQOS": sum(tos_upload['_voice'])})
 | 
			
		||||
            tos_upload.update({"_bkQOS": sum(tos_upload['_bk'])})
 | 
			
		||||
            tos_upload.update({"_beQOS": sum(tos_upload['_be'])})
 | 
			
		||||
            tos_download.update({"_videoQOS": sum(tos_download['_video'])})
 | 
			
		||||
            tos_download.update({"_voiceQOS": sum(tos_download['_voice'])})
 | 
			
		||||
            tos_download.update({"_bkQOS": sum(tos_download['_bk'])})
 | 
			
		||||
            tos_download.update({"_beQOS": sum(tos_download['_be'])})
 | 
			
		||||
        else:
 | 
			
		||||
            print("no connections available to evaluate QOS")
 | 
			
		||||
        print(tos_upload, tos_download)
 | 
			
		||||
@@ -257,19 +257,23 @@ python3 ./throughput_QOS.py
 | 
			
		||||
    print("--------------------------------------------")
 | 
			
		||||
    print(args)
 | 
			
		||||
    print("--------------------------------------------")
 | 
			
		||||
    results = [], load = {"a_min": [], "b_min": []}
 | 
			
		||||
    results = []
 | 
			
		||||
    # for multiple test conditions #
 | 
			
		||||
    if args.num_stations is not None:
 | 
			
		||||
        stations = args.num_stations.split(',')
 | 
			
		||||
    if args.modes is not None:
 | 
			
		||||
    if args.mode is not None:
 | 
			
		||||
        modes = args.mode.split(',')
 | 
			
		||||
    if args.radio is not None:
 | 
			
		||||
        radios = args.radio.split(',')
 | 
			
		||||
    if args.a_min is not None or args.b_min is not None:
 | 
			
		||||
        args.a_min = args.a_min.split(',')
 | 
			
		||||
        args.b_min = args.b_min.split(',')
 | 
			
		||||
        load.update({"a_min": args.a_min})
 | 
			
		||||
        load.update({"b_min": args.b_min})
 | 
			
		||||
        loads = {"a_min": args.a_min, "b_min": args.b_min}
 | 
			
		||||
        # try:
 | 
			
		||||
        #     if len(args.a_min) != len(args.b_min):
 | 
			
		||||
        #         raise print("The values of a_min and b_min should be same.")
 | 
			
		||||
        # finally:
 | 
			
		||||
        #         print("")
 | 
			
		||||
    if args.test_duration is not None:
 | 
			
		||||
        args.test_duration = args.test_duration.strip('m')
 | 
			
		||||
    for station in stations:
 | 
			
		||||
@@ -279,6 +283,7 @@ python3 ./throughput_QOS.py
 | 
			
		||||
                                                  radio=args.radio)
 | 
			
		||||
        else:
 | 
			
		||||
            station_list = args.sta_names.split(",")
 | 
			
		||||
        for index in range(len(loads["a_min"])):
 | 
			
		||||
            throughput_qos = ThroughputQOS(host=args.mgr,
 | 
			
		||||
                                           port=args.mgr_port,
 | 
			
		||||
                                           number_template="0000",
 | 
			
		||||
@@ -292,13 +297,12 @@ python3 ./throughput_QOS.py
 | 
			
		||||
                                           security=args.security,
 | 
			
		||||
                                           test_duration=args.test_duration,
 | 
			
		||||
                                           use_ht160=False,
 | 
			
		||||
                                       side_a_min_rate=args.a_min,
 | 
			
		||||
                                       side_b_min_rate=args.b_min,
 | 
			
		||||
                                           side_a_min_rate=loads["a_min"][index],
 | 
			
		||||
                                           side_b_min_rate=loads["b_min"][index],
 | 
			
		||||
                                           mode=args.mode,
 | 
			
		||||
                                           ap=args.ap,
 | 
			
		||||
                                           traffic_type=args.traffic_type,
 | 
			
		||||
                                           tos=args.tos,
 | 
			
		||||
                                       modes=args.modes,
 | 
			
		||||
                                           _debug_on=args.debug)
 | 
			
		||||
 | 
			
		||||
            throughput_qos.pre_cleanup()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user