mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-04 04:38:02 +00:00 
			
		
		
		
	test_l3_longevity: Fix whitespace
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
				
			|||||||
#!/usr/bin/env python3
 | 
					#!/usr/bin/env python3
 | 
				
			||||||
'''
 | 
					"""
 | 
				
			||||||
NAME: test_l3_longevity.py
 | 
					NAME: test_l3_longevity.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PURPOSE:
 | 
					PURPOSE:
 | 
				
			||||||
@@ -55,7 +55,7 @@ COPYRIGHT:
 | 
				
			|||||||
Copyright 2021 Candela Technologies Inc
 | 
					Copyright 2021 Candela Technologies Inc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INCLUDE_IN_README
 | 
					INCLUDE_IN_README
 | 
				
			||||||
'''
 | 
					"""
 | 
				
			||||||
import argparse
 | 
					import argparse
 | 
				
			||||||
import csv
 | 
					import csv
 | 
				
			||||||
import datetime
 | 
					import datetime
 | 
				
			||||||
@@ -319,7 +319,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        dur = self.duration_time_to_seconds(self.test_duration)
 | 
					        dur = self.duration_time_to_seconds(self.test_duration)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (self.polling_interval_seconds > dur + 1):
 | 
					        if self.polling_interval_seconds > dur + 1:
 | 
				
			||||||
            self.polling_interval_seconds = dur - 1
 | 
					            self.polling_interval_seconds = dur - 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Full spread-sheet data
 | 
					        # Full spread-sheet data
 | 
				
			||||||
@@ -607,12 +607,12 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        # Make sure they are gone
 | 
					        # Make sure they are gone
 | 
				
			||||||
        count = 0
 | 
					        count = 0
 | 
				
			||||||
        while (count < 10):
 | 
					        while count < 10:
 | 
				
			||||||
            more = False
 | 
					            more = False
 | 
				
			||||||
            for station_list in self.station_lists:
 | 
					            for station_list in self.station_lists:
 | 
				
			||||||
                for sta in station_list:
 | 
					                for sta in station_list:
 | 
				
			||||||
                    rv = self.rm_port(sta, check_exists=True)
 | 
					                    rv = self.rm_port(sta, check_exists=True)
 | 
				
			||||||
                    if (rv):
 | 
					                    if rv:
 | 
				
			||||||
                        more = True
 | 
					                        more = True
 | 
				
			||||||
            if not more:
 | 
					            if not more:
 | 
				
			||||||
                break
 | 
					                break
 | 
				
			||||||
@@ -655,9 +655,9 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                    these_cx, these_endp = self.cx_profile.create(
 | 
					                    these_cx, these_endp = self.cx_profile.create(
 | 
				
			||||||
                        endp_type=etype, side_a=[
 | 
					                        endp_type=etype, side_a=[
 | 
				
			||||||
                            self.side_a], side_b=self.side_b, sleep_time=0, tos=_tos)
 | 
					                            self.side_a], 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
 | 
				
			||||||
                    elif(etype == "lf"):
 | 
					                    elif etype == "lf":
 | 
				
			||||||
                        self.lf_endps = self.eth_endps + these_endp
 | 
					                        self.lf_endps = self.eth_endps + these_endp
 | 
				
			||||||
                    else:
 | 
					                    else:
 | 
				
			||||||
                        self.tcp_endps = self.tcp_endps + these_endp
 | 
					                        self.tcp_endps = self.tcp_endps + these_endp
 | 
				
			||||||
@@ -689,7 +689,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                    if etype == "mc_udp" or etype == "mc_udp6":
 | 
					                    if etype == "mc_udp" or etype == "mc_udp6":
 | 
				
			||||||
                        print(
 | 
					                        print(
 | 
				
			||||||
                            "Creating Multicast connections for endpoint type: %s" %
 | 
					                            "Creating Multicast connections for endpoint type: %s" %
 | 
				
			||||||
                            (etype))
 | 
					                            etype)
 | 
				
			||||||
                        self.multicast_profile.create_mc_tx(
 | 
					                        self.multicast_profile.create_mc_tx(
 | 
				
			||||||
                            etype, self.side_b, etype)
 | 
					                            etype, self.side_b, etype)
 | 
				
			||||||
                        self.multicast_profile.create_mc_rx(
 | 
					                        self.multicast_profile.create_mc_rx(
 | 
				
			||||||
@@ -701,7 +701,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                (etype, _tos, self.cx_profile.get_cx_count()))
 | 
					                                (etype, _tos, self.cx_profile.get_cx_count()))
 | 
				
			||||||
                            these_cx, these_endp = self.cx_profile.create(
 | 
					                            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)
 | 
					                                endp_type=etype, side_a=station_profile.station_names, 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
 | 
				
			||||||
@@ -711,7 +711,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
        if self.dataplane:
 | 
					        if self.dataplane:
 | 
				
			||||||
            self._pass(
 | 
					            self._pass(
 | 
				
			||||||
                "PASS: CX build finished: created/updated:  %s connections." %
 | 
					                "PASS: CX build finished: created/updated:  %s connections." %
 | 
				
			||||||
                (self.cx_count))
 | 
					                self.cx_count)
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            self._pass(
 | 
					            self._pass(
 | 
				
			||||||
                "PASS: Stations & CX build finished: created/updated: %s stations and %s connections." %
 | 
					                "PASS: Stations & CX build finished: created/updated: %s stations and %s connections." %
 | 
				
			||||||
@@ -941,7 +941,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
        self.admin_up(self.side_b)
 | 
					        self.admin_up(self.side_b)
 | 
				
			||||||
        for station_profile in self.station_profiles:
 | 
					        for station_profile in self.station_profiles:
 | 
				
			||||||
            for sta in station_profile.station_names:
 | 
					            for sta in station_profile.station_names:
 | 
				
			||||||
                print("Bringing up station %s" % (sta))
 | 
					                print("Bringing up station %s" % sta)
 | 
				
			||||||
                self.admin_up(sta)
 | 
					                self.admin_up(sta)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        temp_stations_list = []
 | 
					        temp_stations_list = []
 | 
				
			||||||
@@ -1002,10 +1002,10 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                dl_pdu_str = dl_pdu
 | 
					                dl_pdu_str = dl_pdu
 | 
				
			||||||
                ul_pdu_str = ul_pdu
 | 
					                ul_pdu_str = ul_pdu
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (ul_pdu == "AUTO" or ul_pdu == "MTU"):
 | 
					                if ul_pdu == "AUTO" or ul_pdu == "MTU":
 | 
				
			||||||
                    ul_pdu = "-1"
 | 
					                    ul_pdu = "-1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (dl_pdu == "AUTO" or dl_pdu == "MTU"):
 | 
					                if dl_pdu == "AUTO" or dl_pdu == "MTU":
 | 
				
			||||||
                    dl_pdu = "-1"
 | 
					                    dl_pdu = "-1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                print(
 | 
					                print(
 | 
				
			||||||
@@ -1051,7 +1051,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                    print(
 | 
					                    print(
 | 
				
			||||||
                        "Monitoring throughput for duration: %s" %
 | 
					                        "Monitoring throughput for duration: %s" %
 | 
				
			||||||
                        (self.test_duration))
 | 
					                        self.test_duration)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    # Monitor test for the interval duration.
 | 
					                    # Monitor test for the interval duration.
 | 
				
			||||||
                    passes = 0
 | 
					                    passes = 0
 | 
				
			||||||
@@ -1150,7 +1150,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                        "interface" not in response):
 | 
					                                        "interface" not in response):
 | 
				
			||||||
                                    print(
 | 
					                                    print(
 | 
				
			||||||
                                        "6g query-port: %s: incomplete response:" %
 | 
					                                        "6g query-port: %s: incomplete response:" %
 | 
				
			||||||
                                        (url))
 | 
					                                        url)
 | 
				
			||||||
                                    pprint(response)
 | 
					                                    pprint(response)
 | 
				
			||||||
                                else:
 | 
					                                else:
 | 
				
			||||||
                                    # print("response".format(response))
 | 
					                                    # print("response".format(response))
 | 
				
			||||||
@@ -1255,7 +1255,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                        "interface" not in response):
 | 
					                                        "interface" not in response):
 | 
				
			||||||
                                    print(
 | 
					                                    print(
 | 
				
			||||||
                                        "6g query-port: %s: incomplete response:" %
 | 
					                                        "6g query-port: %s: incomplete response:" %
 | 
				
			||||||
                                        (url))
 | 
					                                        url)
 | 
				
			||||||
                                    pprint(response)
 | 
					                                    pprint(response)
 | 
				
			||||||
                                else:
 | 
					                                else:
 | 
				
			||||||
                                    # print("response".format(response))
 | 
					                                    # print("response".format(response))
 | 
				
			||||||
@@ -1365,7 +1365,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                        "interface" not in response):
 | 
					                                        "interface" not in response):
 | 
				
			||||||
                                    print(
 | 
					                                    print(
 | 
				
			||||||
                                        "query-port 5g: %s: incomplete response:" %
 | 
					                                        "query-port 5g: %s: incomplete response:" %
 | 
				
			||||||
                                        (url))
 | 
					                                        url)
 | 
				
			||||||
                                    pprint(response)
 | 
					                                    pprint(response)
 | 
				
			||||||
                                else:
 | 
					                                else:
 | 
				
			||||||
                                    # print("response".format(response))
 | 
					                                    # print("response".format(response))
 | 
				
			||||||
@@ -1495,7 +1495,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                        "interface" not in response):
 | 
					                                        "interface" not in response):
 | 
				
			||||||
                                    print(
 | 
					                                    print(
 | 
				
			||||||
                                        "5g query-port: %s: incomplete response:" %
 | 
					                                        "5g query-port: %s: incomplete response:" %
 | 
				
			||||||
                                        (url))
 | 
					                                        url)
 | 
				
			||||||
                                    pprint(response)
 | 
					                                    pprint(response)
 | 
				
			||||||
                                else:
 | 
					                                else:
 | 
				
			||||||
                                    # print("response".format(response))
 | 
					                                    # print("response".format(response))
 | 
				
			||||||
@@ -1604,7 +1604,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                        "interface" not in response):
 | 
					                                        "interface" not in response):
 | 
				
			||||||
                                    print(
 | 
					                                    print(
 | 
				
			||||||
                                        "2g query-port: %s: incomplete response:" %
 | 
					                                        "2g query-port: %s: incomplete response:" %
 | 
				
			||||||
                                        (url))
 | 
					                                        url)
 | 
				
			||||||
                                    pprint(response)
 | 
					                                    pprint(response)
 | 
				
			||||||
                                else:
 | 
					                                else:
 | 
				
			||||||
                                    # print("response".format(response))
 | 
					                                    # print("response".format(response))
 | 
				
			||||||
@@ -1733,7 +1733,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                        "interface" not in response):
 | 
					                                        "interface" not in response):
 | 
				
			||||||
                                    print(
 | 
					                                    print(
 | 
				
			||||||
                                        "5g query-port: %s: incomplete response:" %
 | 
					                                        "5g query-port: %s: incomplete response:" %
 | 
				
			||||||
                                        (url))
 | 
					                                        url)
 | 
				
			||||||
                                    pprint(response)
 | 
					                                    pprint(response)
 | 
				
			||||||
                                else:
 | 
					                                else:
 | 
				
			||||||
                                    # print("response".format(response))
 | 
					                                    # print("response".format(response))
 | 
				
			||||||
@@ -1815,7 +1815,7 @@ class L3VariableTime(Realm):
 | 
				
			|||||||
                                if (response is None) or (
 | 
					                                if (response is None) or (
 | 
				
			||||||
                                        "interface" not in response):
 | 
					                                        "interface" not in response):
 | 
				
			||||||
                                    print(
 | 
					                                    print(
 | 
				
			||||||
                                        "query-port: %s: incomplete response:" % (url))
 | 
					                                        "query-port: %s: incomplete response:" % url)
 | 
				
			||||||
                                    pprint(response)
 | 
					                                    pprint(response)
 | 
				
			||||||
                                else:
 | 
					                                else:
 | 
				
			||||||
                                    port_data = response['interface']
 | 
					                                    port_data = response['interface']
 | 
				
			||||||
@@ -3170,16 +3170,16 @@ Setting wifi_settings per radio
 | 
				
			|||||||
        attenuators = []
 | 
					        attenuators = []
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        attenuators = args.attenuators.split(",")
 | 
					        attenuators = args.attenuators.split(",")
 | 
				
			||||||
    if (args.atten_vals == ""):
 | 
					    if args.atten_vals == "":
 | 
				
			||||||
        atten_vals = [-1]
 | 
					        atten_vals = [-1]
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        atten_vals = args.atten_vals.split(",")
 | 
					        atten_vals = args.atten_vals.split(",")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (len(ul_rates) != len(dl_rates)):
 | 
					    if len(ul_rates) != len(dl_rates):
 | 
				
			||||||
        print(
 | 
					        print(
 | 
				
			||||||
            "ERROR:  ul_rates %s and dl_rates %s arrays must be same length\n" %
 | 
					            "ERROR:  ul_rates %s and dl_rates %s arrays must be same length\n" %
 | 
				
			||||||
            (len(ul_rates), len(dl_rates)))
 | 
					            (len(ul_rates), len(dl_rates)))
 | 
				
			||||||
    if (len(ul_pdus) != len(dl_pdus)):
 | 
					    if len(ul_pdus) != len(dl_pdus):
 | 
				
			||||||
        print(
 | 
					        print(
 | 
				
			||||||
            "ERROR:  ul_pdus %s and dl_pdus %s arrays must be same length\n" %
 | 
					            "ERROR:  ul_pdus %s and dl_pdus %s arrays must be same length\n" %
 | 
				
			||||||
            (len(ul_rates), len(dl_rates)))
 | 
					            (len(ul_rates), len(dl_rates)))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user