mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-03 20:27:54 +00:00 
			
		
		
		
	test_l3_longevity.py : white space only , pep8, line length 150
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
		@@ -141,7 +141,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
        self.side_b = side_b
 | 
					        self.side_b = side_b
 | 
				
			||||||
        self.side_a = side_a
 | 
					        self.side_a = side_a
 | 
				
			||||||
        # if it is a dataplane test the side_a is not none and an ethernet port
 | 
					        # if it is a dataplane test the side_a is not none and an ethernet port
 | 
				
			||||||
        if self.side_a != None:
 | 
					        if self.side_a is not None:
 | 
				
			||||||
            self.dataplane = True
 | 
					            self.dataplane = True
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            self.dataplane = False
 | 
					            self.dataplane = False
 | 
				
			||||||
@@ -161,7 +161,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
        self.polling_interval_seconds = self.duration_time_to_seconds(polling_interval)
 | 
					        self.polling_interval_seconds = self.duration_time_to_seconds(polling_interval)
 | 
				
			||||||
        self.cx_profile = self.new_l3_cx_profile()
 | 
					        self.cx_profile = self.new_l3_cx_profile()
 | 
				
			||||||
        self.multicast_profile = self.new_multicast_profile()
 | 
					        self.multicast_profile = self.new_multicast_profile()
 | 
				
			||||||
        self.multicast_profile.name_prefix = "MLT-";
 | 
					        self.multicast_profile.name_prefix = "MLT-"
 | 
				
			||||||
        self.station_profiles = []
 | 
					        self.station_profiles = []
 | 
				
			||||||
        self.args = args
 | 
					        self.args = args
 | 
				
			||||||
        self.outfile = outfile
 | 
					        self.outfile = outfile
 | 
				
			||||||
@@ -171,8 +171,6 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
        self.mconn = mconn
 | 
					        self.mconn = mconn
 | 
				
			||||||
        self.user_tags = user_tags
 | 
					        self.user_tags = user_tags
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        self.side_a_min_rate = side_a_min_rate
 | 
					        self.side_a_min_rate = side_a_min_rate
 | 
				
			||||||
        self.side_a_max_rate = side_a_max_rate
 | 
					        self.side_a_max_rate = side_a_max_rate
 | 
				
			||||||
        self.side_b_min_rate = side_b_min_rate
 | 
					        self.side_b_min_rate = side_b_min_rate
 | 
				
			||||||
@@ -243,9 +241,9 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        # if side_a is None then side_a is radios
 | 
					        # if side_a is None then side_a is radios
 | 
				
			||||||
        if self.dataplane == False:
 | 
					        if self.dataplane == False:
 | 
				
			||||||
            for (radio_, ssid_, ssid_password_, ssid_security_,\
 | 
					            for (radio_, ssid_, ssid_password_, ssid_security_,
 | 
				
			||||||
                 reset_port_enable_, reset_port_time_min_, reset_port_time_max_) \
 | 
					                 reset_port_enable_, reset_port_time_min_, reset_port_time_max_) \
 | 
				
			||||||
                in zip(radio_name_list, ssid_list, ssid_password_list, ssid_security_list,\
 | 
					                in zip(radio_name_list, ssid_list, ssid_password_list, ssid_security_list,
 | 
				
			||||||
                       reset_port_enable_list, reset_port_time_min_list, reset_port_time_max_list):
 | 
					                       reset_port_enable_list, reset_port_time_min_list, reset_port_time_max_list):
 | 
				
			||||||
                self.station_profile = self.new_station_profile()
 | 
					                self.station_profile = self.new_station_profile()
 | 
				
			||||||
                self.station_profile.lfclient_url = self.lfclient_url
 | 
					                self.station_profile.lfclient_url = self.lfclient_url
 | 
				
			||||||
@@ -254,15 +252,14 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                self.station_profile.security = ssid_security_
 | 
					                self.station_profile.security = ssid_security_
 | 
				
			||||||
                self.station_profile.number_template = self.number_template
 | 
					                self.station_profile.number_template = self.number_template
 | 
				
			||||||
                self.station_profile.mode = 0
 | 
					                self.station_profile.mode = 0
 | 
				
			||||||
                self.station_profile.set_reset_extra(reset_port_enable=reset_port_enable_,\
 | 
					                self.station_profile.set_reset_extra(reset_port_enable=reset_port_enable_,
 | 
				
			||||||
                    test_duration=self.duration_time_to_seconds(self.test_duration),\
 | 
					                                                     test_duration=self.duration_time_to_seconds(self.test_duration),
 | 
				
			||||||
                    reset_port_min_time=self.duration_time_to_seconds(reset_port_time_min_),\
 | 
					                                                     reset_port_min_time=self.duration_time_to_seconds(reset_port_time_min_),
 | 
				
			||||||
                                                     reset_port_max_time=self.duration_time_to_seconds(reset_port_time_max_))
 | 
					                                                     reset_port_max_time=self.duration_time_to_seconds(reset_port_time_max_))
 | 
				
			||||||
                self.station_profiles.append(self.station_profile)
 | 
					                self.station_profiles.append(self.station_profile)
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            pass
 | 
					            pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
        self.multicast_profile.host = self.lfclient_host
 | 
					        self.multicast_profile.host = self.lfclient_host
 | 
				
			||||||
        self.cx_profile.host = self.lfclient_host
 | 
					        self.cx_profile.host = self.lfclient_host
 | 
				
			||||||
        self.cx_profile.port = self.lfclient_port
 | 
					        self.cx_profile.port = self.lfclient_port
 | 
				
			||||||
@@ -295,7 +292,6 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
    def get_ap_ofdma_24g(self):
 | 
					    def get_ap_ofdma_24g(self):
 | 
				
			||||||
        return self.ap_ofdma_24g
 | 
					        return self.ap_ofdma_24g
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    def get_kpi_csv(self):
 | 
					    def get_kpi_csv(self):
 | 
				
			||||||
        #print("self.csv_kpi_file {}".format(self.csv_kpi_file.name))
 | 
					        #print("self.csv_kpi_file {}".format(self.csv_kpi_file.name))
 | 
				
			||||||
        return self.csv_kpi_file.name
 | 
					        return self.csv_kpi_file.name
 | 
				
			||||||
@@ -339,7 +335,6 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                sta_name = name.replace('-A', '')
 | 
					                sta_name = name.replace('-A', '')
 | 
				
			||||||
                # only the -A endpoint will be found so need to look
 | 
					                # only the -A endpoint will be found so need to look
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
                count += 1
 | 
					                count += 1
 | 
				
			||||||
                print("Matched: name: {name} eid:{eid} to endp-id {eid_endp}".format(name=name, eid=eid, eid_endp=eid_endp))
 | 
					                print("Matched: name: {name} eid:{eid} to endp-id {eid_endp}".format(name=name, eid=eid, eid_endp=eid_endp))
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
@@ -365,7 +360,6 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                    total_ul_rate_ll += int(endp["rx rate ll"])
 | 
					                    total_ul_rate_ll += int(endp["rx rate ll"])
 | 
				
			||||||
                    total_ul_pkts_ll += int(endp["rx pkts ll"])
 | 
					                    total_ul_pkts_ll += int(endp["rx pkts ll"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
        return lat, jit, total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll
 | 
					        return lat, jit, total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Query all endpoints to generate rx and other stats, returned
 | 
					    # Query all endpoints to generate rx and other stats, returned
 | 
				
			||||||
@@ -383,9 +377,9 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
        total_dl_ll = 0
 | 
					        total_dl_ll = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for e in self.multicast_profile.get_mc_names():
 | 
					        for e in self.multicast_profile.get_mc_names():
 | 
				
			||||||
            our_endps[e] = e;
 | 
					            our_endps[e] = e
 | 
				
			||||||
        for e in self.cx_profile.created_endp.keys():
 | 
					        for e in self.cx_profile.created_endp.keys():
 | 
				
			||||||
            our_endps[e] = e;
 | 
					            our_endps[e] = e
 | 
				
			||||||
        for endp_name in endp_list['endpoint']:
 | 
					        for endp_name in endp_list['endpoint']:
 | 
				
			||||||
            if endp_name != 'uri' and endp_name != 'handler':
 | 
					            if endp_name != 'uri' and endp_name != 'handler':
 | 
				
			||||||
                for item, value in endp_name.items():
 | 
					                for item, value in endp_name.items():
 | 
				
			||||||
@@ -419,7 +413,6 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                else:
 | 
					                                else:
 | 
				
			||||||
                                    total_ul_ll += int(value)
 | 
					                                    total_ul_ll += int(value)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
        #print("total-dl: ", total_dl, " total-ul: ", total_ul, "\n")
 | 
					        #print("total-dl: ", total_dl, " total-ul: ", total_ul, "\n")
 | 
				
			||||||
        return endp_rx_map, endp_rx_drop_map, endps, total_dl, total_ul, total_dl_ll, total_ul_ll
 | 
					        return endp_rx_map, endp_rx_drop_map, endps, total_dl, total_ul, total_dl_ll, total_ul_ll
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -457,7 +450,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
        for station_profile in self.station_profiles:
 | 
					        for station_profile in self.station_profiles:
 | 
				
			||||||
            rv = rv + station_profile.station_names
 | 
					            rv = rv + station_profile.station_names
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return rv;
 | 
					        return rv
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Create stations and connections/endpoints.  If rebuild is true, then
 | 
					    # Create stations and connections/endpoints.  If rebuild is true, then
 | 
				
			||||||
    # only update connections/endpoints.
 | 
					    # only update connections/endpoints.
 | 
				
			||||||
@@ -515,9 +508,9 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                            these_cx, these_endp = self.cx_profile.create(endp_type=etype, side_a=station_profile.station_names,
 | 
					                            these_cx, these_endp = self.cx_profile.create(endp_type=etype, side_a=station_profile.station_names,
 | 
				
			||||||
                                                                          side_b=self.side_b, sleep_time=0, tos=_tos)
 | 
					                                                                          side_b=self.side_b, sleep_time=0, tos=_tos)
 | 
				
			||||||
                            if (etype == "lf_udp" or etype == "lf_udp6"):
 | 
					                            if (etype == "lf_udp" or etype == "lf_udp6"):
 | 
				
			||||||
                                self.udp_endps = self.udp_endps + these_endp;
 | 
					                                self.udp_endps = self.udp_endps + these_endp
 | 
				
			||||||
                            else:
 | 
					                            else:
 | 
				
			||||||
                                self.tcp_endps = self.tcp_endps + these_endp;
 | 
					                                self.tcp_endps = self.tcp_endps + these_endp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.cx_count = self.cx_profile.get_cx_count()
 | 
					        self.cx_count = self.cx_profile.get_cx_count()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -536,7 +529,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
            ss.expect([pexpect.TIMEOUT], timeout=1)  # do not detete line, waits for output
 | 
					            ss.expect([pexpect.TIMEOUT], timeout=1)  # do not detete line, waits for output
 | 
				
			||||||
            ap_results = ss.before.decode('utf-8', 'ignore')
 | 
					            ap_results = ss.before.decode('utf-8', 'ignore')
 | 
				
			||||||
            print("ap_custom_cmd: {} ap_results {}".format(ap_custom_cmd, ap_results))
 | 
					            print("ap_custom_cmd: {} ap_results {}".format(ap_custom_cmd, ap_results))
 | 
				
			||||||
        except:
 | 
					        except BaseException:
 | 
				
			||||||
            print("ap_custom_cmd: {} WARNING unable to read AP ".format(ap_custom_cmd))
 | 
					            print("ap_custom_cmd: {} WARNING unable to read AP ".format(ap_custom_cmd))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return ap_results
 | 
					        return ap_results
 | 
				
			||||||
@@ -553,7 +546,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
            ap_stats_6g = ss.before.decode('utf-8', 'ignore')
 | 
					            ap_stats_6g = ss.before.decode('utf-8', 'ignore')
 | 
				
			||||||
            print("ap_stats_6g from AP: {}".format(ap_stats_6g))
 | 
					            print("ap_stats_6g from AP: {}".format(ap_stats_6g))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        except:
 | 
					        except BaseException:
 | 
				
			||||||
            print("WARNING: ap_stats_6g unable to read AP")
 | 
					            print("WARNING: ap_stats_6g unable to read AP")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return ap_stats_6g
 | 
					        return ap_stats_6g
 | 
				
			||||||
@@ -570,7 +563,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
            ap_stats_5g = ss.before.decode('utf-8', 'ignore')
 | 
					            ap_stats_5g = ss.before.decode('utf-8', 'ignore')
 | 
				
			||||||
            print("ap_stats_5g from AP: {}".format(ap_stats_5g))
 | 
					            print("ap_stats_5g from AP: {}".format(ap_stats_5g))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        except:
 | 
					        except BaseException:
 | 
				
			||||||
            print("WARNING: ap_stats_5g unable to read AP")
 | 
					            print("WARNING: ap_stats_5g unable to read AP")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return ap_stats_5g
 | 
					        return ap_stats_5g
 | 
				
			||||||
@@ -587,7 +580,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
            ap_stats_2g = ss.before.decode('utf-8', 'ignore')
 | 
					            ap_stats_2g = ss.before.decode('utf-8', 'ignore')
 | 
				
			||||||
            print("ap_stats_2g from AP: {}".format(ap_stats_2g))
 | 
					            print("ap_stats_2g from AP: {}".format(ap_stats_2g))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        except:
 | 
					        except BaseException:
 | 
				
			||||||
            print("WARNING: ap_stats_2g unable to read AP")
 | 
					            print("WARNING: ap_stats_2g unable to read AP")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return ap_stats_2g
 | 
					        return ap_stats_2g
 | 
				
			||||||
@@ -604,12 +597,11 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
            ap_chanim_stats_6g = ss.before.decode('utf-8', 'ignore')
 | 
					            ap_chanim_stats_6g = ss.before.decode('utf-8', 'ignore')
 | 
				
			||||||
            print("read_ap_chanim_stats_6g {}".format(ap_chanim_stats_6g))
 | 
					            print("read_ap_chanim_stats_6g {}".format(ap_chanim_stats_6g))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        except:
 | 
					        except BaseException:
 | 
				
			||||||
            print("WARNING: read_ap_chanim_stats_6g unable to read AP")
 | 
					            print("WARNING: read_ap_chanim_stats_6g unable to read AP")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return ap_chanim_stats_6g
 | 
					        return ap_chanim_stats_6g
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    def read_ap_chanim_stats_5g(self):
 | 
					    def read_ap_chanim_stats_5g(self):
 | 
				
			||||||
        #  5ghz:  wl -i wl1 chanim_stats
 | 
					        #  5ghz:  wl -i wl1 chanim_stats
 | 
				
			||||||
        ap_chanim_stats_5g = ""
 | 
					        ap_chanim_stats_5g = ""
 | 
				
			||||||
@@ -622,7 +614,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
            ap_chanim_stats_5g = ss.before.decode('utf-8', 'ignore')
 | 
					            ap_chanim_stats_5g = ss.before.decode('utf-8', 'ignore')
 | 
				
			||||||
            print("read_ap_chanim_stats_5g {}".format(ap_chanim_stats_5g))
 | 
					            print("read_ap_chanim_stats_5g {}".format(ap_chanim_stats_5g))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        except:
 | 
					        except BaseException:
 | 
				
			||||||
            print("WARNING: read_ap_chanim_stats_5g unable to read AP")
 | 
					            print("WARNING: read_ap_chanim_stats_5g unable to read AP")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return ap_chanim_stats_5g
 | 
					        return ap_chanim_stats_5g
 | 
				
			||||||
@@ -639,7 +631,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
            ap_chanim_stats_2g = ss.before.decode('utf-8', 'ignore')
 | 
					            ap_chanim_stats_2g = ss.before.decode('utf-8', 'ignore')
 | 
				
			||||||
            print("read_ap_chanim_stats_2g {}".format(ap_chanim_stats_2g))
 | 
					            print("read_ap_chanim_stats_2g {}".format(ap_chanim_stats_2g))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        except:
 | 
					        except BaseException:
 | 
				
			||||||
            print("WARNING: read_ap_chanim_stats_2g unable to read AP")
 | 
					            print("WARNING: read_ap_chanim_stats_2g unable to read AP")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return ap_chanim_stats_2g
 | 
					        return ap_chanim_stats_2g
 | 
				
			||||||
@@ -765,7 +757,15 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                        self.epoch_time = int(time.time())
 | 
					                        self.epoch_time = int(time.time())
 | 
				
			||||||
                        new_rx_values, rx_drop_percent, endps, total_dl_bps, total_ul_bps, total_dl_ll_bps, total_ul_ll_bps = self.__get_rx_values()
 | 
					                        new_rx_values, rx_drop_percent, endps, total_dl_bps, total_ul_bps, total_dl_ll_bps, total_ul_ll_bps = self.__get_rx_values()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        print("main loop, total-dl: ", total_dl_bps, " total-ul: ", total_ul_bps, " total-dl-ll: ", total_dl_ll_bps," total-ul-ll: ", total_ul_ll_bps)
 | 
					                        print(
 | 
				
			||||||
 | 
					                            "main loop, total-dl: ",
 | 
				
			||||||
 | 
					                            total_dl_bps,
 | 
				
			||||||
 | 
					                            " total-ul: ",
 | 
				
			||||||
 | 
					                            total_ul_bps,
 | 
				
			||||||
 | 
					                            " total-dl-ll: ",
 | 
				
			||||||
 | 
					                            total_dl_ll_bps,
 | 
				
			||||||
 | 
					                            " total-ul-ll: ",
 | 
				
			||||||
 | 
					                            total_ul_ll_bps)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        # AP OUTPUT
 | 
					                        # AP OUTPUT
 | 
				
			||||||
                        if self.ap_read:
 | 
					                        if self.ap_read:
 | 
				
			||||||
@@ -836,7 +836,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                                if split_row[0].lower() == mac.lower():
 | 
					                                                if split_row[0].lower() == mac.lower():
 | 
				
			||||||
                                                    ap_row = split_row
 | 
					                                                    ap_row = split_row
 | 
				
			||||||
                                                    mac_found_6g = True
 | 
					                                                    mac_found_6g = True
 | 
				
			||||||
                                            except:
 | 
					                                            except BaseException:
 | 
				
			||||||
                                                print("6g 'No stations are currently associated.'? from AP")
 | 
					                                                print("6g 'No stations are currently associated.'? from AP")
 | 
				
			||||||
                                                print(" since possibly no stations: excption on compare split_row[0].lower() ")
 | 
					                                                print(" since possibly no stations: excption on compare split_row[0].lower() ")
 | 
				
			||||||
                                    if mac_found_6g == True:
 | 
					                                    if mac_found_6g == True:
 | 
				
			||||||
@@ -844,7 +844,8 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                        print("6g selected ap_row (from split_row): {}".format(ap_row))
 | 
					                                        print("6g selected ap_row (from split_row): {}".format(ap_row))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                        # Find latency, jitter for connections using this port.
 | 
					                                        # Find latency, jitter for connections using this port.
 | 
				
			||||||
                                        latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll, total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll = self.get_endp_stats_for_port(p["port"], endps)
 | 
					                                        latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll, total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll = self.get_endp_stats_for_port(
 | 
				
			||||||
 | 
					                                            p["port"], endps)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                        # now report the ap_chanim_stats along side of the ap_stats_6g
 | 
					                                        # now report the ap_chanim_stats along side of the ap_stats_6g
 | 
				
			||||||
                                        xtop_reported = False
 | 
					                                        xtop_reported = False
 | 
				
			||||||
@@ -856,13 +857,13 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                                try:
 | 
					                                                try:
 | 
				
			||||||
                                                    xtop = split_row[7]
 | 
					                                                    xtop = split_row[7]
 | 
				
			||||||
                                                    print("6g xtop {xtop}".format(xtop=xtop))
 | 
					                                                    print("6g xtop {xtop}".format(xtop=xtop))
 | 
				
			||||||
                                                except:
 | 
					                                                except BaseException:
 | 
				
			||||||
                                                    print("6g detected chanspec with reading chanim_stats, exception reading xtop")
 | 
					                                                    print("6g detected chanspec with reading chanim_stats, exception reading xtop")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                                try:
 | 
					                                                try:
 | 
				
			||||||
                                                    channel_utilization = float(100) - float(xtop)
 | 
					                                                    channel_utilization = float(100) - float(xtop)
 | 
				
			||||||
                                                    print("6g channel_utilization {utilization}".format(utilization=channel_utilization))
 | 
					                                                    print("6g channel_utilization {utilization}".format(utilization=channel_utilization))
 | 
				
			||||||
                                                except:
 | 
					                                                except BaseException:
 | 
				
			||||||
                                                    print("6g detected chanspec with reading chanim_stats, failed calcluating channel_utilization from xtop")
 | 
					                                                    print("6g detected chanspec with reading chanim_stats, failed calcluating channel_utilization from xtop")
 | 
				
			||||||
                                                # should be only one channel utilization
 | 
					                                                # should be only one channel utilization
 | 
				
			||||||
                                                break
 | 
					                                                break
 | 
				
			||||||
@@ -871,14 +872,15 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                                    if split_row[0].lower() == 'chanspec':
 | 
					                                                    if split_row[0].lower() == 'chanspec':
 | 
				
			||||||
                                                        print("6g chanspec found xtop_reported = True")
 | 
					                                                        print("6g chanspec found xtop_reported = True")
 | 
				
			||||||
                                                        xtop_reported = True
 | 
					                                                        xtop_reported = True
 | 
				
			||||||
                                                except:
 | 
					                                                except BaseException:
 | 
				
			||||||
                                                    print("6g Error reading xtop")
 | 
					                                                    print("6g Error reading xtop")
 | 
				
			||||||
                                        # ap information is passed with ap_row so all information needs to be contained in ap_row
 | 
					                                        # ap information is passed with ap_row so all information needs to be contained in ap_row
 | 
				
			||||||
                                        ap_row.append(str(channel_utilization))
 | 
					                                        ap_row.append(str(channel_utilization))
 | 
				
			||||||
                                        print("6g channel_utilization {channel_utilization}".format(channel_utilization=channel_utilization))
 | 
					                                        print("6g channel_utilization {channel_utilization}".format(channel_utilization=channel_utilization))
 | 
				
			||||||
                                        print("6g ap_row {ap_row}".format(ap_row=ap_row))
 | 
					                                        print("6g ap_row {ap_row}".format(ap_row=ap_row))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                        ap_stats_6g_col_titles = ['Station Address','PHY Mbps','Data Mbps','Air Use','Data Use','Retries','bw','mcs','Nss','ofdma','mu-mimo','channel_utilization']
 | 
					                                        ap_stats_6g_col_titles = ['Station Address', 'PHY Mbps', 'Data Mbps', 'Air Use',
 | 
				
			||||||
 | 
					                                                                  'Data Use', 'Retries', 'bw', 'mcs', 'Nss', 'ofdma', 'mu-mimo', 'channel_utilization']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                        self.write_port_csv(len(temp_stations_list), ul, dl, ul_pdu_str, dl_pdu_str, atten_val, eid_name, p,
 | 
					                                        self.write_port_csv(len(temp_stations_list), ul, dl, ul_pdu_str, dl_pdu_str, atten_val, eid_name, p,
 | 
				
			||||||
                                                            latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll,
 | 
					                                                            latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll,
 | 
				
			||||||
@@ -950,7 +952,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                                if split_row[0].lower() == mac.lower():
 | 
					                                                if split_row[0].lower() == mac.lower():
 | 
				
			||||||
                                                    ap_row = split_row
 | 
					                                                    ap_row = split_row
 | 
				
			||||||
                                                    mac_found_5g = True
 | 
					                                                    mac_found_5g = True
 | 
				
			||||||
                                            except:
 | 
					                                            except BaseException:
 | 
				
			||||||
                                                print("5g 'No stations are currently associated.'? from AP")
 | 
					                                                print("5g 'No stations are currently associated.'? from AP")
 | 
				
			||||||
                                                print("5g since possibly no stations: excption on compare split_row[0].lower() ")
 | 
					                                                print("5g since possibly no stations: excption on compare split_row[0].lower() ")
 | 
				
			||||||
                                    if mac_found_5g == True:
 | 
					                                    if mac_found_5g == True:
 | 
				
			||||||
@@ -958,7 +960,8 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                        print("5g selected ap_row (from split_row): {}".format(ap_row))
 | 
					                                        print("5g selected ap_row (from split_row): {}".format(ap_row))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                        # Find latency, jitter for connections using this port.
 | 
					                                        # Find latency, jitter for connections using this port.
 | 
				
			||||||
                                        latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll, total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll = self.get_endp_stats_for_port(p["port"], endps)
 | 
					                                        latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll, total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll = self.get_endp_stats_for_port(
 | 
				
			||||||
 | 
					                                            p["port"], endps)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                        # now report the ap_chanim_stats along side of the ap_stats_5g
 | 
					                                        # now report the ap_chanim_stats along side of the ap_stats_5g
 | 
				
			||||||
                                        xtop_reported = False
 | 
					                                        xtop_reported = False
 | 
				
			||||||
@@ -970,13 +973,13 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                                try:
 | 
					                                                try:
 | 
				
			||||||
                                                    xtop = split_row[7]
 | 
					                                                    xtop = split_row[7]
 | 
				
			||||||
                                                    print("5g xtop {xtop}".format(xtop=xtop))
 | 
					                                                    print("5g xtop {xtop}".format(xtop=xtop))
 | 
				
			||||||
                                                except:
 | 
					                                                except BaseException:
 | 
				
			||||||
                                                    print("5g detected chanspec with reading chanim_stats, exception reading xtop")
 | 
					                                                    print("5g detected chanspec with reading chanim_stats, exception reading xtop")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                                try:
 | 
					                                                try:
 | 
				
			||||||
                                                    channel_utilization = float(100) - float(xtop)
 | 
					                                                    channel_utilization = float(100) - float(xtop)
 | 
				
			||||||
                                                    print("5g channel_utilization {utilization}".format(utilization=channel_utilization))
 | 
					                                                    print("5g channel_utilization {utilization}".format(utilization=channel_utilization))
 | 
				
			||||||
                                                except:
 | 
					                                                except BaseException:
 | 
				
			||||||
                                                    print("5g detected chanspec with reading chanim_stats, failed calcluating channel_utilization from xtop")
 | 
					                                                    print("5g detected chanspec with reading chanim_stats, failed calcluating channel_utilization from xtop")
 | 
				
			||||||
                                                # should be only one channel utilization
 | 
					                                                # should be only one channel utilization
 | 
				
			||||||
                                                break
 | 
					                                                break
 | 
				
			||||||
@@ -985,14 +988,15 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                                    if split_row[0].lower() == 'chanspec':
 | 
					                                                    if split_row[0].lower() == 'chanspec':
 | 
				
			||||||
                                                        print("5g chanspec found xtop_reported = True")
 | 
					                                                        print("5g chanspec found xtop_reported = True")
 | 
				
			||||||
                                                        xtop_reported = True
 | 
					                                                        xtop_reported = True
 | 
				
			||||||
                                                except:
 | 
					                                                except BaseException:
 | 
				
			||||||
                                                    print("5g Error reading xtop")
 | 
					                                                    print("5g Error reading xtop")
 | 
				
			||||||
                                        # ap information is passed with ap_row so all information needs to be contained in ap_row
 | 
					                                        # ap information is passed with ap_row so all information needs to be contained in ap_row
 | 
				
			||||||
                                        ap_row.append(str(channel_utilization))
 | 
					                                        ap_row.append(str(channel_utilization))
 | 
				
			||||||
                                        print("5g channel_utilization {channel_utilization}".format(channel_utilization=channel_utilization))
 | 
					                                        print("5g channel_utilization {channel_utilization}".format(channel_utilization=channel_utilization))
 | 
				
			||||||
                                        print("5g ap_row {ap_row}".format(ap_row=ap_row))
 | 
					                                        print("5g ap_row {ap_row}".format(ap_row=ap_row))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                        ap_stats_5g_col_titles = ['Station Address','PHY Mbps','Data Mbps','Air Use','Data Use','Retries','bw','mcs','Nss','ofdma','mu-mimo','channel_utilization']
 | 
					                                        ap_stats_5g_col_titles = ['Station Address', 'PHY Mbps', 'Data Mbps', 'Air Use',
 | 
				
			||||||
 | 
					                                                                  'Data Use', 'Retries', 'bw', 'mcs', 'Nss', 'ofdma', 'mu-mimo', 'channel_utilization']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                        self.write_port_csv(len(temp_stations_list), ul, dl, ul_pdu_str, dl_pdu_str, atten_val, eid_name, p,
 | 
					                                        self.write_port_csv(len(temp_stations_list), ul, dl, ul_pdu_str, dl_pdu_str, atten_val, eid_name, p,
 | 
				
			||||||
                                                            latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll,
 | 
					                                                            latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll,
 | 
				
			||||||
@@ -1063,7 +1067,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                                if split_row[0].lower() == mac.lower():
 | 
					                                                if split_row[0].lower() == mac.lower():
 | 
				
			||||||
                                                    ap_row = split_row
 | 
					                                                    ap_row = split_row
 | 
				
			||||||
                                                    mac_found_2g = True
 | 
					                                                    mac_found_2g = True
 | 
				
			||||||
                                            except:
 | 
					                                            except BaseException:
 | 
				
			||||||
                                                print("2g 'No stations are currently associated.'? from AP")
 | 
					                                                print("2g 'No stations are currently associated.'? from AP")
 | 
				
			||||||
                                                print("2g since possibly no stations: excption on compare split_row[0].lower() ")
 | 
					                                                print("2g since possibly no stations: excption on compare split_row[0].lower() ")
 | 
				
			||||||
                                    if mac_found_2g == True:
 | 
					                                    if mac_found_2g == True:
 | 
				
			||||||
@@ -1071,7 +1075,8 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                        print("2g selected ap_row (from split_row): {}".format(ap_row))
 | 
					                                        print("2g selected ap_row (from split_row): {}".format(ap_row))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                        # Find latency, jitter for connections using this port.
 | 
					                                        # Find latency, jitter for connections using this port.
 | 
				
			||||||
                                        latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll, total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll = self.get_endp_stats_for_port(p["port"], endps)
 | 
					                                        latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll, total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll = self.get_endp_stats_for_port(
 | 
				
			||||||
 | 
					                                            p["port"], endps)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                        # now report the ap_chanim_stats along side of the ap_stats_2g
 | 
					                                        # now report the ap_chanim_stats along side of the ap_stats_2g
 | 
				
			||||||
                                        xtop_reported = False
 | 
					                                        xtop_reported = False
 | 
				
			||||||
@@ -1083,13 +1088,13 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                                try:
 | 
					                                                try:
 | 
				
			||||||
                                                    xtop = split_row[7]
 | 
					                                                    xtop = split_row[7]
 | 
				
			||||||
                                                    print("2g xtop {xtop}".format(xtop=xtop))
 | 
					                                                    print("2g xtop {xtop}".format(xtop=xtop))
 | 
				
			||||||
                                                except:
 | 
					                                                except BaseException:
 | 
				
			||||||
                                                    print("2g detected chanspec with reading chanim_stats, exception reading xtop")
 | 
					                                                    print("2g detected chanspec with reading chanim_stats, exception reading xtop")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                                try:
 | 
					                                                try:
 | 
				
			||||||
                                                    channel_utilization = float(100) - float(xtop)
 | 
					                                                    channel_utilization = float(100) - float(xtop)
 | 
				
			||||||
                                                    print("2g channel_utilization {utilization}".format(utilization=channel_utilization))
 | 
					                                                    print("2g channel_utilization {utilization}".format(utilization=channel_utilization))
 | 
				
			||||||
                                                except:
 | 
					                                                except BaseException:
 | 
				
			||||||
                                                    print("2g detected chanspec with reading chanim_stats, failed calcluating channel_utilization from xtop")
 | 
					                                                    print("2g detected chanspec with reading chanim_stats, failed calcluating channel_utilization from xtop")
 | 
				
			||||||
                                                # should be only one channel utilization
 | 
					                                                # should be only one channel utilization
 | 
				
			||||||
                                                break
 | 
					                                                break
 | 
				
			||||||
@@ -1098,14 +1103,15 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                                    if split_row[0].lower() == 'chanspec':
 | 
					                                                    if split_row[0].lower() == 'chanspec':
 | 
				
			||||||
                                                        print("2g chanspec found xtop_reported = True")
 | 
					                                                        print("2g chanspec found xtop_reported = True")
 | 
				
			||||||
                                                        xtop_reported = True
 | 
					                                                        xtop_reported = True
 | 
				
			||||||
                                                except:
 | 
					                                                except BaseException:
 | 
				
			||||||
                                                    print("2g Error reading xtop")
 | 
					                                                    print("2g Error reading xtop")
 | 
				
			||||||
                                        # ap information is passed with ap_row so all information needs to be contained in ap_row
 | 
					                                        # ap information is passed with ap_row so all information needs to be contained in ap_row
 | 
				
			||||||
                                        ap_row.append(str(channel_utilization))
 | 
					                                        ap_row.append(str(channel_utilization))
 | 
				
			||||||
                                        print("2g channel_utilization {channel_utilization}".format(channel_utilization=channel_utilization))
 | 
					                                        print("2g channel_utilization {channel_utilization}".format(channel_utilization=channel_utilization))
 | 
				
			||||||
                                        print("2g ap_row {ap_row}".format(ap_row=ap_row))
 | 
					                                        print("2g ap_row {ap_row}".format(ap_row=ap_row))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                        ap_stats_2g_col_titles = ['Station Address','PHY Mbps','Data Mbps','Air Use','Data Use','Retries','bw','mcs','Nss','ofdma','mu-mimo','channel_utilization']
 | 
					                                        ap_stats_2g_col_titles = ['Station Address', 'PHY Mbps', 'Data Mbps', 'Air Use',
 | 
				
			||||||
 | 
					                                                                  'Data Use', 'Retries', 'bw', 'mcs', 'Nss', 'ofdma', 'mu-mimo', 'channel_utilization']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                        self.write_port_csv(len(temp_stations_list), ul, dl, ul_pdu_str, dl_pdu_str, atten_val, eid_name, p,
 | 
					                                        self.write_port_csv(len(temp_stations_list), ul, dl, ul_pdu_str, dl_pdu_str, atten_val, eid_name, p,
 | 
				
			||||||
                                                            latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll,
 | 
					                                                            latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll,
 | 
				
			||||||
@@ -1125,15 +1131,25 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                    pprint(response)
 | 
					                                    pprint(response)
 | 
				
			||||||
                                else:
 | 
					                                else:
 | 
				
			||||||
                                    p = response['interface']
 | 
					                                    p = response['interface']
 | 
				
			||||||
                                    latency, jitter, total_ul_rate,  total_ul_rate_ll, total_ul_pkts_ll, total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll= self.get_endp_stats_for_port(p["port"], endps)
 | 
					                                    latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll, total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll = self.get_endp_stats_for_port(
 | 
				
			||||||
 | 
					                                        p["port"], endps)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                    self.write_port_csv(len(temp_stations_list), ul, dl, ul_pdu_str, dl_pdu_str, atten_val, eid_name, p,
 | 
					                                    self.write_port_csv(len(temp_stations_list), ul, dl, ul_pdu_str, dl_pdu_str, atten_val, eid_name, p,
 | 
				
			||||||
                                                        latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll,
 | 
					                                                        latency, jitter, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll,
 | 
				
			||||||
                                                        total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll, ap_row, ap_stats_col_titles)  # ap_stats_col_titles used as a length
 | 
					                                                        total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll, ap_row, ap_stats_col_titles)  # ap_stats_col_titles used as a length
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
                    # At end of test step, record KPI information. This is different the kpi.csv
 | 
					                    # At end of test step, record KPI information. This is different the kpi.csv
 | 
				
			||||||
                    self.record_kpi(len(temp_stations_list), ul, dl, ul_pdu_str, dl_pdu_str, atten_val, total_dl_bps, total_ul_bps, total_dl_ll_bps, total_ul_ll_bps)
 | 
					                    self.record_kpi(
 | 
				
			||||||
 | 
					                        len(temp_stations_list),
 | 
				
			||||||
 | 
					                        ul,
 | 
				
			||||||
 | 
					                        dl,
 | 
				
			||||||
 | 
					                        ul_pdu_str,
 | 
				
			||||||
 | 
					                        dl_pdu_str,
 | 
				
			||||||
 | 
					                        atten_val,
 | 
				
			||||||
 | 
					                        total_dl_bps,
 | 
				
			||||||
 | 
					                        total_ul_bps,
 | 
				
			||||||
 | 
					                        total_dl_ll_bps,
 | 
				
			||||||
 | 
					                        total_ul_ll_bps)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    # At end of test if requested store upload and download stats
 | 
					                    # At end of test if requested store upload and download stats
 | 
				
			||||||
                    if self.ap_scheduler_stats:
 | 
					                    if self.ap_scheduler_stats:
 | 
				
			||||||
@@ -1152,7 +1168,6 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                        # get the (DL) Download 24g schduler staticstics
 | 
					                        # get the (DL) Download 24g schduler staticstics
 | 
				
			||||||
                        self.ap_24g_msched += self.ap_custom_cmd('wl -i wl0 dump msched')
 | 
					                        self.ap_24g_msched += self.ap_custom_cmd('wl -i wl0 dump msched')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
                    if self.ap_ofdma_stats:
 | 
					                    if self.ap_ofdma_stats:
 | 
				
			||||||
                        # provide OFDMA stats 6GHz
 | 
					                        # provide OFDMA stats 6GHz
 | 
				
			||||||
                        self.ap_ofdma_6g += self.ap_custom_cmd('wl -i wl2 muinfo -v')
 | 
					                        self.ap_ofdma_6g += self.ap_custom_cmd('wl -i wl2 muinfo -v')
 | 
				
			||||||
@@ -1195,8 +1210,8 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
        writer.writerow(row)
 | 
					        writer.writerow(row)
 | 
				
			||||||
        self.port_csv_files[eid_name].flush()
 | 
					        self.port_csv_files[eid_name].flush()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Submit data to the influx db if configured to do so.
 | 
					    # Submit data to the influx db if configured to do so.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def record_kpi(self, sta_count, ul, dl, ul_pdu, dl_pdu, atten, total_dl_bps, total_ul_bps, total_dl_ll_bps, total_ul_ll_bps):
 | 
					    def record_kpi(self, sta_count, ul, dl, ul_pdu, dl_pdu, atten, total_dl_bps, total_ul_bps, total_dl_ll_bps, total_ul_ll_bps):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        tags = dict()
 | 
					        tags = dict()
 | 
				
			||||||
@@ -1214,7 +1229,8 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        now = str(datetime.datetime.utcnow().isoformat())
 | 
					        now = str(datetime.datetime.utcnow().isoformat())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        print("NOTE:  Adding kpi to influx, total-download-bps: %s  upload: %s  bi-directional: %s\n"%(total_dl_bps, total_ul_bps, (total_ul_bps + total_dl_bps)))
 | 
					        print("NOTE:  Adding kpi to influx, total-download-bps: %s  upload: %s  bi-directional: %s\n" %
 | 
				
			||||||
 | 
					              (total_dl_bps, total_ul_bps, (total_ul_bps + total_dl_bps)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if self.influxdb is not None:
 | 
					        if self.influxdb is not None:
 | 
				
			||||||
            self.influxdb.post_to_influx("total-download-bps", total_dl_bps, tags, now)
 | 
					            self.influxdb.post_to_influx("total-download-bps", total_dl_bps, tags, now)
 | 
				
			||||||
@@ -1315,6 +1331,8 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
    # End of the main class.
 | 
					    # End of the main class.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Check some input values.
 | 
					# Check some input values.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def valid_endp_types(_endp_type):
 | 
					def valid_endp_types(_endp_type):
 | 
				
			||||||
    etypes = _endp_type.split(',')
 | 
					    etypes = _endp_type.split(',')
 | 
				
			||||||
    for endp_type in etypes:
 | 
					    for endp_type in etypes:
 | 
				
			||||||
@@ -1415,7 +1433,10 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        ''')
 | 
					        ''')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    parser.add_argument('--local_lf_report_dir', help='--local_lf_report_dir override the report path, primary use when running test in test suite',default="")
 | 
					    parser.add_argument(
 | 
				
			||||||
 | 
					        '--local_lf_report_dir',
 | 
				
			||||||
 | 
					        help='--local_lf_report_dir override the report path, primary use when running test in test suite',
 | 
				
			||||||
 | 
					        default="")
 | 
				
			||||||
    parser.add_argument('-o', '--csv_outfile', help="--csv_outfile <Output file for csv data>", default="")
 | 
					    parser.add_argument('-o', '--csv_outfile', help="--csv_outfile <Output file for csv data>", default="")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    parser.add_argument('--tty', help='--tty \"/dev/ttyUSB2\" the serial interface to the AP', default="")
 | 
					    parser.add_argument('--tty', help='--tty \"/dev/ttyUSB2\" the serial interface to the AP', default="")
 | 
				
			||||||
@@ -1424,7 +1445,10 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m
 | 
				
			|||||||
    parser.add_argument('--port_reset_seconds', help='--ports_reset_seconds \"<min seconds> <max seconds>\" ', default="10 30")
 | 
					    parser.add_argument('--port_reset_seconds', help='--ports_reset_seconds \"<min seconds> <max seconds>\" ', default="10 30")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    parser.add_argument('--lfmgr', help='--lfmgr <hostname for where LANforge GUI is running>', default='localhost')
 | 
					    parser.add_argument('--lfmgr', help='--lfmgr <hostname for where LANforge GUI is running>', default='localhost')
 | 
				
			||||||
    parser.add_argument('--test_duration', help='--test_duration <how long to run>  example --time 5d (5 days) default: 3m options: number followed by d, h, m or s',default='3m')
 | 
					    parser.add_argument(
 | 
				
			||||||
 | 
					        '--test_duration',
 | 
				
			||||||
 | 
					        help='--test_duration <how long to run>  example --time 5d (5 days) default: 3m options: number followed by d, h, m or s',
 | 
				
			||||||
 | 
					        default='3m')
 | 
				
			||||||
    parser.add_argument('--tos', help='--tos:  Support different ToS settings: BK | BE | VI | VO | numeric', default="BE")
 | 
					    parser.add_argument('--tos', help='--tos:  Support different ToS settings: BK | BE | VI | VO | numeric', default="BE")
 | 
				
			||||||
    parser.add_argument('--debug', help='--debug flag present debug on  enable debugging', action='store_true')
 | 
					    parser.add_argument('--debug', help='--debug flag present debug on  enable debugging', action='store_true')
 | 
				
			||||||
    parser.add_argument('-t', '--endp_type', help='--endp_type <types of traffic> example --endp_type \"lf_udp lf_tcp mc_udp\"  Default: lf_udp , options: lf_udp, lf_udp6, lf_tcp, lf_tcp6, mc_udp, mc_udp6',
 | 
					    parser.add_argument('-t', '--endp_type', help='--endp_type <types of traffic> example --endp_type \"lf_udp lf_tcp mc_udp\"  Default: lf_udp , options: lf_udp, lf_udp6, lf_tcp, lf_tcp6, mc_udp, mc_udp6',
 | 
				
			||||||
@@ -1448,8 +1472,14 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m
 | 
				
			|||||||
    parser.add_argument('--ap_chanim_cmd_6g', help='ap_chanim_cmd_6g \'wl -i wl2 chanim_stats\'', default="wl -i wl2 chanim_stats")
 | 
					    parser.add_argument('--ap_chanim_cmd_6g', help='ap_chanim_cmd_6g \'wl -i wl2 chanim_stats\'', default="wl -i wl2 chanim_stats")
 | 
				
			||||||
    parser.add_argument('--ap_chanim_cmd_5g', help='ap_chanim_cmd_5g \'wl -i wl1 chanim_stats\'', default="wl -i wl1 chanim_stats")
 | 
					    parser.add_argument('--ap_chanim_cmd_5g', help='ap_chanim_cmd_5g \'wl -i wl1 chanim_stats\'', default="wl -i wl1 chanim_stats")
 | 
				
			||||||
    parser.add_argument('--ap_chanim_cmd_2g', help='ap_chanim_cmd_2g \'w1 -i wl0 chanim_stats\'', default="wl -i wl0 chanim_stats")
 | 
					    parser.add_argument('--ap_chanim_cmd_2g', help='ap_chanim_cmd_2g \'w1 -i wl0 chanim_stats\'', default="wl -i wl0 chanim_stats")
 | 
				
			||||||
    parser.add_argument('--ap_scheduler_stats', help='--ap_scheduler_stats flag to clear stats run test then dump ul and dl stats to file', action='store_true')
 | 
					    parser.add_argument(
 | 
				
			||||||
    parser.add_argument('--ap_ofdma_stats', help='--ap_ofdma_stats flag to clear stats run test then dumps wl -i wl1 muinfo -v and wl 0i wl0 muinof -v to file', action='store_true')
 | 
					        '--ap_scheduler_stats',
 | 
				
			||||||
 | 
					        help='--ap_scheduler_stats flag to clear stats run test then dump ul and dl stats to file',
 | 
				
			||||||
 | 
					        action='store_true')
 | 
				
			||||||
 | 
					    parser.add_argument(
 | 
				
			||||||
 | 
					        '--ap_ofdma_stats',
 | 
				
			||||||
 | 
					        help='--ap_ofdma_stats flag to clear stats run test then dumps wl -i wl1 muinfo -v and wl 0i wl0 muinof -v to file',
 | 
				
			||||||
 | 
					        action='store_true')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    parser.add_argument('--ap_test_mode', help='ap_test_mode flag present use ap canned data', action='store_true')
 | 
					    parser.add_argument('--ap_test_mode', help='ap_test_mode flag present use ap canned data', action='store_true')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1466,7 +1496,10 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m
 | 
				
			|||||||
    parser.add_argument("--multiconn", default=1,
 | 
					    parser.add_argument("--multiconn", default=1,
 | 
				
			||||||
                        help="Configure multi-conn setting for endpoints.  Default is 1 (auto-helper is enabled by default as well).")
 | 
					                        help="Configure multi-conn setting for endpoints.  Default is 1 (auto-helper is enabled by default as well).")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    parser.add_argument('--attenuators', help='--attenuators,  comma separated list of attenuator module eids:  shelf.resource.atten-serno.atten-idx', default="")
 | 
					    parser.add_argument(
 | 
				
			||||||
 | 
					        '--attenuators',
 | 
				
			||||||
 | 
					        help='--attenuators,  comma separated list of attenuator module eids:  shelf.resource.atten-serno.atten-idx',
 | 
				
			||||||
 | 
					        default="")
 | 
				
			||||||
    parser.add_argument('--atten_vals', help='--atten_vals,  comma separated list of attenuator settings in ddb units (1/10 of db)', default="")
 | 
					    parser.add_argument('--atten_vals', help='--atten_vals,  comma separated list of attenuator settings in ddb units (1/10 of db)', default="")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    influx_add_parser_args(parser)
 | 
					    influx_add_parser_args(parser)
 | 
				
			||||||
@@ -1474,7 +1507,6 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m
 | 
				
			|||||||
    parser.add_argument("--cap_ctl_out", help="--cap_ctl_out, switch the controller output will be captured", action='store_true')
 | 
					    parser.add_argument("--cap_ctl_out", help="--cap_ctl_out, switch the controller output will be captured", action='store_true')
 | 
				
			||||||
    parser.add_argument("--wait", help="--wait <time> , time to wait at the end of the test", default='0')
 | 
					    parser.add_argument("--wait", help="--wait <time> , time to wait at the end of the test", default='0')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    args = parser.parse_args()
 | 
					    args = parser.parse_args()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #print("args: {}".format(args))
 | 
					    #print("args: {}".format(args))
 | 
				
			||||||
@@ -1556,19 +1588,23 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    # Create report, when running with the test framework (lf_check.py) results need to be in the same directory
 | 
					    # Create report, when running with the test framework (lf_check.py) results need to be in the same directory
 | 
				
			||||||
    if local_lf_report_dir != "":
 | 
					    if local_lf_report_dir != "":
 | 
				
			||||||
        report = lf_report.lf_report(_path=local_lf_report_dir, _results_dir_name = "test_l3_longevity",_output_html="test_l3_longevity.html",_output_pdf="test_l3_longevity.pdf")
 | 
					        report = lf_report.lf_report(
 | 
				
			||||||
 | 
					            _path=local_lf_report_dir,
 | 
				
			||||||
 | 
					            _results_dir_name="test_l3_longevity",
 | 
				
			||||||
 | 
					            _output_html="test_l3_longevity.html",
 | 
				
			||||||
 | 
					            _output_pdf="test_l3_longevity.pdf")
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        report = lf_report.lf_report(_results_dir_name = "test_l3_longevity",_output_html="test_l3_longevity.html",_output_pdf="test_l3_longevity.pdf")
 | 
					        report = lf_report.lf_report(
 | 
				
			||||||
 | 
					            _results_dir_name="test_l3_longevity",
 | 
				
			||||||
 | 
					            _output_html="test_l3_longevity.html",
 | 
				
			||||||
 | 
					            _output_pdf="test_l3_longevity.pdf")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if args.csv_outfile is not None:
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if args.csv_outfile != None:
 | 
					 | 
				
			||||||
        current_time = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime())
 | 
					        current_time = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime())
 | 
				
			||||||
        csv_outfile = "{}_{}-test_l3_longevity.csv".format(args.csv_outfile, current_time)
 | 
					        csv_outfile = "{}_{}-test_l3_longevity.csv".format(args.csv_outfile, current_time)
 | 
				
			||||||
        csv_outfile = report.file_add_path(csv_outfile)
 | 
					        csv_outfile = report.file_add_path(csv_outfile)
 | 
				
			||||||
        print("csv output file : {}".format(csv_outfile))
 | 
					        print("csv output file : {}".format(csv_outfile))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    influxdb = None
 | 
					    influxdb = None
 | 
				
			||||||
    if args.influx_bucket is not None:
 | 
					    if args.influx_bucket is not None:
 | 
				
			||||||
        from InfluxRequest import RecordInflux
 | 
					        from InfluxRequest import RecordInflux
 | 
				
			||||||
@@ -1578,7 +1614,6 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m
 | 
				
			|||||||
                                _influx_token=args.influx_token,
 | 
					                                _influx_token=args.influx_token,
 | 
				
			||||||
                                _influx_bucket=args.influx_bucket)
 | 
					                                _influx_bucket=args.influx_bucket)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    MAX_NUMBER_OF_STATIONS = 1000
 | 
					    MAX_NUMBER_OF_STATIONS = 1000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    radio_name_list = []
 | 
					    radio_name_list = []
 | 
				
			||||||
@@ -1593,12 +1628,13 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m
 | 
				
			|||||||
    reset_port_time_min_list = []
 | 
					    reset_port_time_min_list = []
 | 
				
			||||||
    reset_port_time_max_list = []
 | 
					    reset_port_time_max_list = []
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if radios != None:
 | 
					    if radios is not None:
 | 
				
			||||||
        print("radios {}".format(radios))
 | 
					        print("radios {}".format(radios))
 | 
				
			||||||
        for radio_ in radios:
 | 
					        for radio_ in radios:
 | 
				
			||||||
            radio_keys = ['radio', 'stations', 'ssid', 'ssid_pw', 'security']
 | 
					            radio_keys = ['radio', 'stations', 'ssid', 'ssid_pw', 'security']
 | 
				
			||||||
            print("radio_dict before format {}".format(radio_))
 | 
					            print("radio_dict before format {}".format(radio_))
 | 
				
			||||||
            radio_info_dict = dict(map(lambda x: x.split('=='), str(radio_).replace('"','').replace('[','').replace(']','').replace("'","").replace(","," ").split()))
 | 
					            radio_info_dict = dict(map(lambda x: x.split('=='), str(radio_).replace('"', '').replace(
 | 
				
			||||||
 | 
					                '[', '').replace(']', '').replace("'", "").replace(",", " ").split()))
 | 
				
			||||||
            print("radio_dict {}".format(radio_info_dict))
 | 
					            print("radio_dict {}".format(radio_info_dict))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            for key in radio_keys:
 | 
					            for key in radio_keys:
 | 
				
			||||||
@@ -1629,7 +1665,6 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m
 | 
				
			|||||||
                reset_port_time_min_list.append('0s')
 | 
					                reset_port_time_min_list.append('0s')
 | 
				
			||||||
                reset_port_time_max_list.append('0s')
 | 
					                reset_port_time_max_list.append('0s')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
        index = 0
 | 
					        index = 0
 | 
				
			||||||
        for (radio_name_, number_of_stations_per_radio_) in zip(radio_name_list, number_of_stations_per_radio_list):
 | 
					        for (radio_name_, number_of_stations_per_radio_) in zip(radio_name_list, number_of_stations_per_radio_list):
 | 
				
			||||||
            number_of_stations = int(number_of_stations_per_radio_)
 | 
					            number_of_stations = int(number_of_stations_per_radio_)
 | 
				
			||||||
@@ -1785,7 +1820,6 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m
 | 
				
			|||||||
        ap_24g_msched_file.write(str(ap_24g_msched_data))
 | 
					        ap_24g_msched_file.write(str(ap_24g_msched_data))
 | 
				
			||||||
        ap_24g_msched_file.close()
 | 
					        ap_24g_msched_file.close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    # ap scheduler results and write to a file
 | 
					    # ap scheduler results and write to a file
 | 
				
			||||||
    if ap_ofdma_stats:
 | 
					    if ap_ofdma_stats:
 | 
				
			||||||
        print("getting ofdma ap data and writing to a file")
 | 
					        print("getting ofdma ap data and writing to a file")
 | 
				
			||||||
@@ -1812,9 +1846,9 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m
 | 
				
			|||||||
        ap_ofdma_24g_data.write(str(ap_ofdma_24g_data))
 | 
					        ap_ofdma_24g_data.write(str(ap_ofdma_24g_data))
 | 
				
			||||||
        ap_ofdma_24g_data.close()
 | 
					        ap_ofdma_24g_data.close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    # for csv_file in csv_list:
 | 
					    # for csv_file in csv_list:
 | 
				
			||||||
    #    print("Ouptput reports CSV list value: {}".format(str(csv_file)))
 | 
					    #    print("Ouptput reports CSV list value: {}".format(str(csv_file)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == "__main__":
 | 
					if __name__ == "__main__":
 | 
				
			||||||
    main()
 | 
					    main()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user