def __init__(self):
        BaseTest.__init__(self)
        RoamingCommon.__init__(self)
#-------------------User Configuration--------------------------------


        #-------------- Hardware definition ----------------
        """
        The CardMap defines the WaveBlade ports that will be available for the
        test.
        Field Definitions:                                                     
          PortName -    Name given to the specified WaveBlade port. This is a 
                      user defined name. 
          ChassisID -   The WT90/20 Chassis DNS name or IP address. Format: 
                      'string' or '0.0.0.0'
          CardNumber -  The WaveBlade card number as given on the Chassis front
                      panel.
          PortNumber -  The WaveBlade port number, should be equal to 0 for 
                      current cards. 
          For Ethernet Card:
              Autonegotiation mode - Ethernet Autonegotiation mode. Valid values: 
                              'on', 'off', 'forced'.
              Speed -       Ethernet speed setting if not obtained by 
              Autonegotiation. Valid values: 10, 100, 1000
              Duplex -      Ethernet Duplex mode if not obtained by 
                          autonegotiation. Valid values: 'full', 'half'
          For WiFi Card:
              Channel -     WiFi channel number to use on the port. 
              
        Field Format: dictionary
          For Wifi Cards - 
              <PortName>: ( <ChassisID>, <CardNumber>, <PortNumber>, 
                          <Channel> ),
          For Ethernet Cards - 
              <PortName>: ( <ChassisID>, <CardNumber>, <PortNumber>, 
                          <autoNegotiation>, <speed>, <duplex> ),
        """
        self.CardMap = { 'WT90_E1': ( 'wt-tga-14-61', 1, 0, 'on', 100, 'full' ),
                         'WT90_W1': ( 'wt-tga-14-61', 3, 0, 2 ),
                         'WT90_W2': ( 'wt-tga-14-61', 4, 0, 2 )
                       }


        """
        testOptions contains the options applicable across all the roaming groups.
        'flowPacketSize':   The size of the packets sent to the roaming clients (from an 
                            eth group), this packet flow is used in measuring the 
                            roam metrics (roaming delay, packet loss etc)
        'flowRate': The rate of the above flow
        'repeatType':   Specifies whether test should be run for certain amount of time 
                        or for certain number of cycles
                        Values-   'Duration', 'Repeat'
        'durationUnits': Applicable only when 'repeatType' is 2 (Duration)
                         Values- 0: Seconds, 1: Minutes, 2:Hours
        'repeatValue':  This specifies the amount of time or number of cycles depending
                        on the 'repeatType'
                        Type- Positive Integer
                        
        'learningFlowFlag': Specifies whether learning flows are to be used
                            0: OFF, 1: ON
        'learningPacketRate': Rate of the learning flow 
        
        The below options specify client attributes while roaming 
        Their values are 0:OFF, 1:ON
        
        'disassociate': Disassociate to the AP the client is leaving (to a roam AP)
        'deauth':  Deauthenticate to the AP the client is leaving (to a roam AP)

        'reassoc': Use reassociate message rather than associate when associating 
                   to a roam AP (an AP roamed to)
        'renewDHCPonConn': Renew DHCP on reconnection
        'renewDHCP': Renew DHCP on roam
        'preauth': Pre-authenticate the clients to the APs they might roam to
        'pmkid': PMKID caching enbled
        """
        testOptions = {
                        'flowRate': 100,
                        'flowPacketSize': 256,
                        'repeatType': 'Repeat',
                        'durationUnits':0,
                        'repeatValue': 2,
                        'learningFlowFlag': 1,
                        'learningPacketRate': 100, 
                        'renewDHCPonConn': 0, 
                        'renewDHCP': 0,
                        'preauth': 0, 
                        'reassoc': 0, 
                        'deauth': 0, 
                        'disassociate': 0, 
                        'pmkid': 0, 
                       }
        """
        Security Options is dictionary of passed security parameters.  
        It has a mandatory key of 'Method' and optional keys depending 
        upon the particular security chose.  Some common one shown in the 
        code below:
        """
        self.Security_Eth_None = {'Method': 'None'}
        
        self.Security_WPA_PSK = {
                                 'Method': 'WPA-PSK',
                                'AnonymousIdentity': 'anonymous', 
                                'NetworkAuthMethod': 'PSK', 
                                'KeyType': 'ascii', 
                                'EnabeValidateCertificate': 'on', 
                                'KeyWidth': '', 
                                'EncryptionMethod': 'TKIP', 
                                'RootCertificate': '', 
                                'AputhMethod': 'Open', 
                                'LoginFile': '', 
                                'KeyId': '1', 
                                'ClientCertificate': '', 
                                'StartIndex': '1', 
                                'PrivateKeyFile': '', 
                                'LoginMethod': 'Single', 
                                'NetworkKey': 'whatever', 
                                'Password': '******', 
                                'Identity': 'anonymous'
                                }         
        self.Security_None = {    'Method': 'None'}  
        
        self.Security_WEP  = {'Method': 'WEP-OPEN-128', 'KeyId': 0, 
                               'NetworkKey': '00:00:00:00:00:00' }
        self.Security_WPA2 = {'Method': 'WPA2-EAP-TLS', 
                              'Identity': 'anonymous', 'Password' : 'whatever'}
          
        """
        The NetworkList defines the network profiles that can be configured
        for a clientgroup.
        Each profile is a Dictionary of <Profilename> : {Parameters}
        Field Definitions of Parameters:
          'ssid' : <ssidname>  - Type : string
          'security' : <security options> - Type : dictionary.
          'otherflags' : {Different network related flags}
          
          The different network related flags can optionally be 
          'Disassoc_before_reassoc' : <0/1> (0:OFF, 1:ON)
          'Reassoc_when_roam' : <0/1> (0:OFF, 1:ON)
          'pmkid_cache' : <0/1> (0:OFF, 1:ON)
          'Deauth_before_roam' : <0/1> (0:OFF, 1:ON)
          'PreAuth' : <0/1> (0:OFF, 1:ON)
          'renewDHCPonConn': <0/1> (0:OFF, 1:ON)
          'renewDHCP': <0/1> (0:OFF, 1:ON)
        """
        self.NetworkList = {
                            'Group_1security': 
                                        {'ssid': 'None',
                                         'security': self.Security_Eth_None, 
                                         'bssid': 'None'
                                        }, 
                            'Security1': 
                                        {'ssid': 'Open-2',
                                         'security':self.Security_None,
                                         'otherflags': 
                                                    {'Disassoc_before_reassoc': testOptions['disassociate'], 
                                                     'Deauth_before_roam': testOptions['deauth'], 
                                                     'pmkid_cache': testOptions['pmkid'], 
                                                     'renewDHCPonConn': testOptions['renewDHCPonConn'], 
                                                     'PreAuth': testOptions['preauth'], 
                                                     'Reassoc_when_roam': testOptions['reassoc'], 
                                                     'renewDHCP': testOptions['renewDHCP']
                                                     }
                                        },
                                        
                           'Aruba': {'ssid': 'aruba',
                                     'security': self.Security_WPA2,
                                     'otherflags' : {}},

                           'EthNetwork':     {
                                              'security':self.Security_None
                                              }
                           }

        """
        These parameters will effect the performance of the test. They 
        should only be altered if a specific problem is occuring that 
        keeps the test from executing with the DUT.

        ARPRate -    The rate at which the test will attempt issue ARP requests 
                     during the learning phase.  Units: ARPs/second; Type: float
        ARPRetries - Number of attempts to retry any give ARP request before 
                     considering the ARP a failure.
        ARPTimeout - Amount of time the test will wait for an ARP response 
                     before retrying or failing.
        """
        self.ARPRate           =  10.0
        self.ARPRetries        =   3
        self.ARPTimeout        =  10.0

        #-------------------- Timing parameters -----------------
        """
        These parameters will effect the performance of the test. They should 
        only be altered if a specific problem is occuring that keeps the 
        test from executing with the DUT. 
        BSSIDscanTime -     Amount of time to allow for scanning during the 
                        BSSID discovery process. Units: seconds
        AssociateRate -     The rate at which the test will attempt to 
                        associate clients with the SUT. This includes the time 
                        required to complete .1X authentications.  
                        Units: associations/second.
        AssociateTimeout -  Amount of time the test will wait for a client 
                            association to complete before considering iteration 
                            a failed connection. Units: seconds; 
        AssociateRetries -  Number of attempts to retry the complete 
                            association process for each client in the test.
        """
        self.BSSIDscanTimeout = 5
        self.AssociateRate    = 10
        self.AssociateTimeout = 10 
        self.AssociateRetries = 0

        #--------------------- Logging Parameters ---------------
        """
        These parameters determine how the output of the test is to be formed. 
        CSVfilename -       Name of the output file that will contain the 
                            primary test results. This file will be in CSV format. 
                            This name can include a path as well. 
                            Otherwise the file will be placed at the location of 
                            the calling program. 
        SavePCAPfile -      Boolean True/False value. If True a PCAP file will 
                            be created containing the detailed frame data that 
                            was captured on each WT-20/90 port. 
        """
        self.CSVfilename      = 'Results_roaming_benchmark.csv'
        self.ReportFilename   = 'Report_roaming_benchmark.pdf'
        self.DetailedFilename = 'Detailed_roaming_benchmark.csv'
        self.RSSIfilename     = 'RSSI_roaming_benchmark.csv'
        self.LoggingDirectory = "logs"
        self.SavePCAPfile     = False


        """
        self.roamRate : The number of roams in the SUT per second.
        """ 
        self.roamRate = 1.0
        
        self.roamInterval = 1/self.roamRate
        
        """
        self.roamFlowMappings: This contains the list of lists, with each inner 
                                list being of length 2, with first item as source 
                                group sending traffic to the second item the name 
                                of the destination group receiving traffic
        """
        self.roamFlowMappings = [['Group_1', 'Group_2']]
        
        #------------------- Flow Parameters ----------------
        """
        These parameters determine the type of data frames and flows to be 
        used in the test.
        Any of the defined flows can then be attached to a clientgroup.
        A Flowlist is a dictionary of 'Flowname' : 
        {Key : Value pairs} 
        Key : Value pairs can be
        'Type' : Packet or frame type. Valid values: 'UDP', 'TCP', 'IP', 'ICMP'
        'Framesize' : frame size . Type <integer>
        'Phyrate' : rate. Type <integer>
        'Ratemode' : 'pps'
        'Intendedrate' : Traffic rate. Type <integer>
        'Numframes' : Max frames to be sent. Type <integer>
        'srcPort': Source Port of the flow. Type<String>
        'destPort': Destination Port of the flow. Type<String>
        MainFlowlist -  The list of flows that would be attached to a 
                        clientgroup as the main traffic pattern for the clientgroup. The
                        traffic will flow from Ethernet client to the Wireless clients in
                        the clientgroup.
        """
        self.MainFlowlist = {
                            'Flow1': 
                                 {'Type': 'UDP',
                                  'Intendedrate': testOptions['flowRate'], 
                                  'Framesize': testOptions['flowPacketSize'], 
                                  'Phyrate': 54.0, 
                                  'Numframes': WE.MAXtxFrames,
                                  'srcPort': '8000', 
                                  'destPort': '69',
                                  'Ratemode': 'pps'
                                  }
                            }

        #Some Misc computations
        testTypeVal = testOptions['repeatValue']
        if testOptions['repeatType'] == 'Duration':
            durationUnits = testOptions['durationUnits']
            if durationUnits == 1: #minutes
                testTypeVal *= 60
            elif durationUnits == 2: #hours
                testTypeVal *= 3600
            self.totalduration = testTypeVal

        #-------------------- Roam profiles-----------------------
        """
        Any of the Roam profiles can be attached to a clientgroup. Thus, each 
        of the clients in the clientgroup will inherit the attached Roam 
        profile.
        A Roamlist of a dictionary of form, 'Roamprofilename' : 
        {Key : Value pairs}
          Key : Value pairs can be
          'PortList': listofports - This is the list of ports 
                      across which the Roam is to be executed.
          'TestType' : <'Repeat'/'Duration'> - If 'Repeat', then the roams
                      will be repeated across all ports for 'val' number of times.
                      If 'Duration', then the roams will be executed for 'val' 
                      period of time iterating through the port list.
          'TestTypeValue' : <repeatcount/duration value> - Type: float/integer.
                          This value is interpreted on the basis of roam_testtype config.
          'ClientDistr' : <True>. The clients always will be evenly distributed 
                          across all the available ports. 
          'TimeDistr' : <'even'> - Type: string. Always 'even', 
                      the roam events of all the clients will be distributed 
                      evenly across the given dwell time. 
         """ 
        self.Roamlist = {
                         'Roam1': 
                                 {
                                  'PortList': ['WT90_W1', 'WT90_W2'],
                                  'BSSIDList': ['00:15:c6:28:c2:31', '00:13:c4:0d:70:11'],
                                  'DwellTime': [self.roamInterval, self.roamInterval],
                                  'TesttypeValue': testTypeVal, 
                                  'TestType': testOptions['repeatType'],
                                  'TimeDistr': 'even',
                                  'ClientDistr': True
                                  }
                        }
        
        #---------------- ClientGroup Parameters ----------------
        """
        The Clientgroups is a dictionary that defines the characteristics of
        each clientgroup. A number of wireless clients are created each of 
        which inherits the properties of the clientgroup.
        Each of the clientgroup is defined as 
        'Groupname': {Key : Value pairs}
        Key : Value pairs can be
        'StartMAC' : The MAC address of the first client in the group. For 
                    random MAC, use 'DEFAULT'
        'MACIncrMode': <'INCREMENT'/'DECREMENT'>
        'MACStep'   : Change step in the direction specified through 'MACIncrMode'
        'StartIP'  : The IP address of the first client in the group.
        'IPStep': Specify which of the bytes have to be incremented and by how much 
                    Type <String>
        'Gateway'  : Gateway IP address for all the clients.
        'SubMask'  : Subnet mask for the IP addresses of the clients.
        'NumClients' : The number of wireless clients to be created in 
                        this client group.
        'Security' : security profile name - This attaches a network 
                    profile that gets configured for each of the clients.
        'Roamprof' : roamprofile name - This attaches a roam profile that 
                    gets configured for each of the clients.
        'MainFlow' : mainflow name - The main traffic flow that will be 
                    attached to each client.
        'ClientLearning': <'on' / 'off'> Whether Client Learning is to be ON or OFF
        LearningRate - The client learning rate 
        'AssocProbe': Probe before associate- either do not send probe request 
                    ('None') or send probe request (either 'Unicast' or 'Broadcast')
        'VlanEnable': <'True'/ 'False'>,
        'VlanUserPriority': 0-7, 
        'VlanCfi': Should the CFI bit be set. Type <Boolean> 
        'VlanId': Type <Integer>
        'QoSFlag': Should QoS flag be set. Type <Boolean>
        """
        self.Clientgroups = {
                            'Group_2': 
                                 {'Enable': True, 
                                  'StartMAC'  : 'ae:ae:ae:00:00:01',
                                  'MACIncrMode'   : 'INCREMENT',
                                  'MACStep'   : 1,
                                  'StartIP': '192.168.1.11',
                                  'IPStep': '0.0.0.1', 
                                  'Gateway': '192.168.1.1', 
                                  'SubMask': '255.255.255.0', 
                                  'NumClients': 1, 
                                  'Security': 'Security1', 
                                  'Roamprof': 'Roam1', 
                                  'MainFlow': 'Flow1',
                                  'ClientLearning': 'on',
                                  'LearningRate': 100, 
                                  'AssocProbe': 'Unicast',
                                  'MgmtPhyRate': 6.0, 
                                  'GratuitousArp': 'True', 
                                  'ProactiveKeyCaching': 'False', 
                                  }
                            } 
                    
        self.nonRoamGroups = {
                              'Group_1': {'Enable'    : True,
                                         'StartMAC'  : '50:40:30:20:10:aa',
                                         'MACIncrMode'   : 'INCREMENT',
                                         'MACStep'   : 1,
                                         'StartIP'   : '192.168.1.100',
                                         'IPStep'    : '0.0.0.1',
                                         'Gateway'   : '192.168.1.1',
                                         'SubMask'   : '255.255.255.0',
                                         'Port'      : 'WT90_E1',
                                         'Interface' : '802.3',
                                         'Security'  : 'Group_1security',
                                         'NumClients': 1,
                                         'VlanEnable': 'True',
                                         'VlanUserPriority': 0, 
                                         'VlanCfi': True, 
                                         'VlanId': 2,
                                         'QoSFlag'   : True,
                                         'Dhcp'      : 'Disable',
                                         'MgmtPhyRate': '6', 
                                         'GratuitousArp': 'True', 
                                         'Interface': '802.3 Ethernet', 
                                         'PhyRate': '54'
                                        }
                            }


# ---------------- End of User configuration ------------- 

#Data Structure manipulation based on the user configuration above

        self.testKey = 'roaming_benchmark'
        self.testName = 'Roaming Benchmark'
        
        #self.dummyClientGroupNumsDict, self.dummyRoamBenchDict need
        #to be populated for the script to run on its own (rather than as module)
        self.dummyClientGroupNumsDict = {}
        for group in self.Clientgroups:
            self.dummyClientGroupNumsDict[group] = self.Clientgroups[group]['NumClients']

        groupRoamInfo = {}
        for group in self.Clientgroups:
            groupRoamInfo[group] = {'portNameList': 
                                        self.Roamlist[self.Clientgroups[group]['Roamprof']]['PortList'],
                                    'ssid':
                                        self.NetworkList[self.Clientgroups[group]['Security']]['ssid'],
                                    'bssidList':
                                        self.Roamlist[self.Clientgroups[group]['Roamprof']]['BSSIDList']
                                            
                                    }
        #This data structure is the same as 
        self.dummyRoamBenchDict = { 'roamRate': 1/self.roamInterval,  
                                    'roamTraffic': self.roamFlowMappings,
                                    'dwellTime': self.roamInterval,
                                    'backgroundTraffic': [], 
                                    'powerProfileFlag': 0,
                                    
                                    }
        
        self.dummyRoamBenchDict.update(testOptions)
        #Repeat type should be int
        if testOptions[ 'repeatType'] == 'Duration':
            self.dummyRoamBenchDict['repeatType'] = 1
        elif testOptions[ 'repeatType'] == 'Repeat':
            self.dummyRoamBenchDict['repeatType'] = 2
            
        self.dummyRoamBenchDict.update(groupRoamInfo)

#----------------------------------------------------------------------------------------
        self.graphPlotInterval = 1.0
        self.roamSourcePorts = {}
        self.nonRoamClientGroups = {} 
        self.roamTrafficSource = {}
Beispiel #2
0
    def __init__(self):
        BaseTest.__init__(self)
        RoamingCommon.__init__(self)
        
        """
        Specify the test name, needed roaming_common.RoamingCommon
        """
        self.testName = 'Roaming Delay'
        
#-------------------User Configuration--------------------------------
        """
        Specify the duration for which the test is to be run.
        """
        self.totalduration = 25

        #-------------- Hardware definition ----------------
        """
        The CardMap defines the WaveBlade ports that will be available for the
        test.
        Field Definitions:                                                     
          PortName -    Name given to the specified WaveBlade port. This is a 
          user defined name. 
          ChassisID -   The WT90/20 Chassis DNS name or IP address. Format: 
          'string' or '0.0.0.0'
          CardNumber -  The WaveBlade card number as given on the Chassis front
          panel.
          PortNumber -  The WaveBlade port number, should be equal to 0 for 
          current cards. 
          Channel -     WiFi channel number to use on the port. 
          Autonegotiation - Ethernet Autonegotiation mode. Valid values: 
          'on', 'off', 'forced'.
          Speed -       Ethernet speed setting if not obtained by 
          autonegotiation. Valid values: 10, 100, 1000
          Duplex -      Ethernet Duplex mode if not obtained by 
          autonegotiation. Valid values: 'full', 'half'
        Field Format: dictionary
          For Wifi Cards - 
              <PortName>: ( <ChassisID>, <CardNumber>, <PortNumber>, 
              <Channel> ),
          For Ethernet Cards - 
              <PortName>: ( <ChassisID>, <CardNumber>, <PortNumber>, 
              <autoNegotiation>, <speed>, <duplex> ),
        """
        self.CardMap = { 'WT90_E1': ( 'wt-tga-14-61', 1, 0, 'on', 100, 'full' ),
                         'WT90_W1': ( 'wt-tga-14-61', 3, 0, 2 ),
                         'WT90_W2': ( 'wt-tga-14-61', 4, 0, 2 )
                       }

        """
        Security Options is dictionary of passed security parameters.  
        It has a mandatory key of 'Method' and optional keys depending 
        upon the particular security chose.  Some common one defined:
        """
        self.Security_None = {'Method': 'NONE'}
        self.Security_WEP  = {'Method': 'WEP-OPEN-128', 'KeyId': 0, 
        'NetworkKey': '00:00:00:00:00:00' }
        self.Security_WPA2 = {'Method': 'WPA2-EAP-TLS', 
        'Identity': 'anonymous', 'Password' : 'whatever'}
          
        """
        The NetworkList defines the network profiles that can be configured
        for a clientgroup.
        Each profile is a Dictionary of <Profilename> : {Parameters}
        Field Definitions of Parameters:
          'ssid' : <ssidname>  - Type : string
          'security' : <security options> - Type : dictionary.
          'otherflags' : {Different network related flags}
          The different network related flags can optionally be 
          'Disassoc_before_reassoc' : <True/False>
          'Reassoc_when_roam' : <True/False>
          'pmkid_cache' : <True/False>
          'Deauth_before_roam' : <True/False>
          'PreAuth' : <True/False>
        """
        self.NetworkList = {
                           'Cisco': {'ssid': 'cisco', 
                           'security': self.Security_None, 
                           'otherflags': {'Disassoc_before_reassoc': False, 
                           'Reassoc_when_roam': False, 'pmkid_cache': False,
                           'Deauth_before_roam': False, 'PreAuth' : False} },

                           'Aruba': {'ssid': 'aruba', 
                           'security': self.Security_WPA2, 'otherflags' : {}},

                           'Colubris_NONE': {'ssid': 'roam_ap', 
                           'security': self.Security_None, 'otherflags' : {}},
                            
                           'Colubris_WPA2': {'ssid': 'WPA2_EAP', 
                           'security': self.Security_WPA2, 'otherflags' : {}}
                           }

        """
        Ethernet Client properties. For now, there is just one Ethernet 
        client that can be configured. The main traffic will flow from 
        Ethernet to the Wireless clients.
        """
        self.Port8023_Name       = 'WT90_E1'
        self.Port8023_ClientName = 'Client_8023'
        self.Port8023_IPaddress  = '192.168.1.160'
        self.Port8023_Subnet     = '255.255.0.0'
        self.Port8023_Gateway    = '192.168.1.110'
        self.Port8023_MAC        = 'DEFAULT'
        self.Port8023_AssocRate    = 100
        self.Port8023_AssocTimeout = 1
        self.Port8023_AssocRetry   = 1
        self.Port8023_VlanTag    = {}

        """
        These parameters will effect the performance of the test. They 
        should only be altered if a specific problem is occuring that 
        keeps the test from executing with the DUT.

        ARPRate -    The rate at which the test will attempt issue ARP requests 
                     during the learning phase.  Units: ARPs/second; Type: float
        ARPRetries - Number of attempts to retry any give ARP request before 
                     considering the ARP a failure.
        ARPTimeout - Amount of time the test will wait for an ARP response 
                     before retrying or failing.
        """
        self.ARPRate           =  10.0
        self.ARPRetries        =   3
        self.ARPTimeout        =  10.0

        #-------------------- Timing parameters -----------------
        """
        These parameters will effect the performance of the test. They should 
        only be altered if a specific problem is occuring that keeps the 
        test from executing with the DUT. 
        BSSIDscanTime -     Amount of time to allow for scanning during the 
        BSSID discovery process. Units: seconds
        AssociateRate -     The rate at which the test will attempt to 
        associate clients with the SUT. This includes the time required to 
        complete .1X authentications.  Units: associations/second.
        AssociateTimeout -  Amount of time the test will wait for a client 
        association to complete before considering iteration a failed 
        connection. Units: seconds; 
        AssociateRetries -  Number of attempts to retry the complete 
        association process for each client in the test.
        """
        self.BSSIDscanTimeout = 5
        self.AssociateRate    = 10
        self.AssociateTimeout = 10 
        self.AssociateRetries = 0

        #--------------------- Logging Parameters ---------------
        """
        These parameters determine how the output of the test is to be formed. 
        CSVfilename -       Name of the output file that will contain the 
        primary test results. This file will be in CSV format. This name can 
        include a path as well. Otherwise the file will be placed at the 
        location of the calling program. 
        SavePCAPfile -      Boolean True/False value. If True a PCAP file will 
        be created containing the detailed frame data that was captured on 
        each WT-20/90 port. 
        """
        self.CSVfilename      = 'Results_roaming_delay.csv'
        self.ReportFilename   = 'Report_roaming_delay.pdf'
        self.DetailedFilename = 'Detailed_roaming_delay.csv'
        self.RSSIfilename     = 'RSSI_roaming_delay.csv'
        self.LoggingDirectory = "logs"
        self.SavePCAPfile     = False

        #------------ Power ramp up/down profiles ---------------
        """
        These profiles determine what power ramp up/down pattern will be 
        generated for each Roam event for any client. Any of the defined
        power profiles can be attached to a Roam profile which in turn gets
        attached to a clientgroup.
        A Powerlist is a dictionary of the form, 'Powerprofilename' : 
        ([power ramp down profile], [power ramp up profile]). 
        A power ramp down/up profile = [startpower, endpower, powerstep, 
        timeinterval]
        startpower - This is the power level from which the power up/down 
        pattern will start. startpower has to be greater than stoppower in
        a power ramp down event. viceversa for ramp up event.
        stoppower  - This is the power level at which the power up/down
        patter will stop.
        powerstep  - The power increment/decrement steps.
        timeinterval - How long to transmit frames at each power level.
        """
        self.Powerlist = { 
                         'Pprofile1': ([-20, -20, 10, 100], [-20, -10, 10, 100])
                         }

        #-------------------- Roam profiles-----------------------
        """
        Any of the Roam profiles can be attached to a clientgroup. Thus, each 
        of the clients in the clientgroup will inherit the attached Roam 
        profile.
        A Roamlist of a dictionary of form, 'Roamprofilename' : 
        {Key : Value pairs}
          Key : Value pairs can be
          'PortList': listofports - This is the list of ports 
          across which the Roam is to be executed.
          'DwellTime' : listofdwelltimes - This is the list of dwell times 
          for any client on each of the corresponding ports. There has to 
          be a direct mapping between the portlist and dwelltime list. 
          'ClientDistr' : <True/False> - If True, then the clients
          will be evenly distributed across all the available ports. If False,
          then all the clients will start roaming from the first port.
          'TimeDistr' : <'even'/'dense'> - Type: string. If 'even', then
          the roam events of all the clients will be distributed evenly across
          the given dwell time. When timedistribution is 'even', there can be
          only one dwelltime in the listofdwelltimes. 
          'TestType' : <'Repeat'/'Duration'> - If 'Repeat', then the roams
          will be repeated across all ports for 'val' number of times.
          If 'Duration', then the roams will be executed for 'val' period of
          time iterating through the port list.
          'TestTypeValue' : <repeatcount/duration value> - Type: float/integer.
          This value is interpreted on the basis of roam_testtype config.
          'Powerprof' : <name of the power profile> - Type: string.
          This is the name of a predefined powerprofile. See power ramp up
          down profile section. 
         """ 
        self.Roamlist = {
                        'Roam1': {'PortList'     : ['WT90_W1', 'WT90_W2'], 
                                  'DwellTime'    : [5, 1],
                                  'BSSIDList'    : ['00:13:5f:0e:cb:10', '00:12:44:b1:7e:b0'],
                                  'ClientDistr'  : True ,
                                  'TimeDistr'    : 'even',
                                  'TestType'     : 'Duration',
                                  'TesttypeValue': 31,
                                  'Powerprof'    : 'Pprofile1'
                                  },
                        'Roam2': {'PortList'     : ['WT90_W1', 'WT90_W2'], 
                                  'DwellTime'    : [5, 3],
                                  'BSSIDList'    : ['00:13:5f:0e:cb:10', '00:12:44:b1:7e:b0'],
                                  'ClientDistr'  : False,
                                  'TimeDistr'    : 'dense',
                                  'TestType'     : 'Repeat',
                                  'TesttypeValue': 3,
                                  }
                        }
                        
        #------------------- Flow Parameters ----------------
        """
        These parameters determine the type of data frames and flows to be 
        used in the test.
        Any of the defined flows can then be attached to a clientgroup.
        A Flowlist is a dictionary of 'Flowname' : 
        {Key : Value pairs} 
        Key : Value pairs can be
        'Type' : Packet or frame type. Valid values: 'UDP', 'TCP', 'IP', 'ICMP'
        'Framesize' : frame size . Type <integer>
        'Phyrate' : rate. Type <integer>
        'Ratemode' : 'pps'
        'Intendedrate' : Traffic rate. Type <integer>
        'Numframes' : Max frames to be sent. Type <integer>
        MainFlowlist - The list of flows that would be attached to a 
        clientgroup as the main traffic pattern for the clientgroup. The
        traffic will flow from Ethernet client to the Wireless clients in
        the clientgroup.
        LearnFlowlist - The list of learning flows that can be attached 
        to a clientgroup. The learning flows would be generated from the
        clients in the clientgroup to the Ethernet client.
        """
        self.MainFlowlist = {
                            'Flow1': {'Type'         : 'IP', 
                                      'Framesize'    : 512,
                                      'Phyrate'      : 54, 
                                      'Ratemode'     : 'pps',
                                      'Intendedrate' : 100, 
                                      'Numframes'    : WE.MAXtxFrames
                                      }
                            }
        self.LearnFlowlist = {
                            'Lflow1':{'Type'         : 'IP',
                                      'Framesize'    : 256, 
                                      'Phyrate'      : 54, 
                                      'Ratemode'     : 'pps', 
                                      'Intendedrate' : 100, 
                                      'Numframes'    : 10
                                     }
                             }

        #---------------- ClientGroup Parameters ----------------
        """
        The Clientgroups is a dictionary that defines the characteristics of
        each clientgroup. A number of wireless clients are created each of 
        which inherits the properties of the clientgroup.
        Each of the clientgroup is defined as 
        'Groupname': {Key : Value pairs}
        Key : Value pairs can be
        'StartMAC' : The MAC address of the first client in the group. For 
        random MAC, use 'DEFAULT'
        'StartIP'  : The IP address of the first client in the group.
        'Gateway'  : Gateway IP address for all the clients.
        'SubMask'  : Subnet mask for the IP addresses of the clients.
        'NumClients' : The number of wireless clients to be created in 
        this client group.
        'Security' : security profile name - This attaches a network 
        profile that gets configured for each of the clients.
        'Roamprof' : roamprofile name - This attaches a roam profile that 
        gets configured for each of the clients.
        'MainFlow' : mainflow name - The main traffic flow that will be 
        attached to each client.
        'LearnFlow' : learnflow name - The learning traffic flow that will 
        get attached to each client. 
        'AssocProbe': Probe before associate- either do not send probe request ('None') or
                     send probe request (either 'Unicast' or 'Broadcast')
        """
        self.Clientgroups = {
                            'Group1': {'Enable'    : True,
                                       'StartMAC'  : 'ae:ae:ae:00:00:01',
                                       'MACIncr'   : -4,
                                       'StartIP'   : '192.168.1.100', 
                                       'IncrIp'    : '0.0.0.1',
                                       'Gateway'   : '192.168.1.110',
                                       'SubMask'   : '255.255.255.0',
                                       'NumClients': 2,
                                       'Security'  : 'Cisco',
                                       'Roamprof'  : 'Roam1',
                                       'MainFlow'  : 'Flow1',
                                       'LearnFlow' : 'Lflow1',
                                       'AssocProbe': 'Unicast'
                                       },
                            'Group2': {'Enable'    : False,
                                       'StartMAC'  : '00:00:11:22:33:44',
                                       'MACIncr'   : 'Auto',
                                       'StartIP'   : '192.168.1.200',
                                       'IncrIp'    : '0.0.0.1',
                                       'Gateway'   : '192.168.1.110',
                                       'SubMask'   : '255.255.255.0', 
                                       'NumClients': 2,
                                       'Security'  : 'Cisco',
                                       'Roamprof'  : 'Roam2',
                                       'MainFlow'  : 'Flow1'
                                       } 
                            }

                        
# ---------------- End of User configuration -------------
        self.graphPlotInterval = 3.0