mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-31 18:58:01 +00:00
Fix test_ipv4_ttls.py
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -127,8 +127,9 @@ class TTLSTest(LFCliBase):
|
||||
self.station_profile.mode = 0
|
||||
|
||||
# Layer3 Traffic
|
||||
self.l3_cx_obj_udp = IPVariableTime(host=self.host, port=self.port,
|
||||
create_sta=False, sta_list=self.sta_list, traffic_type="lf_udp",
|
||||
self.l3_cx_obj_udp = IPVariableTime(host=self.host, port=self.port, radio=self.radio,
|
||||
ssid=self.ssid, password=self.password, security=self.security,
|
||||
use_existing_sta=False, sta_list=self.sta_list, traffic_type="lf_udp",
|
||||
upstream=self.upstream_port)
|
||||
self.l3_cx_obj_udp.cx_profile.name_prefix = "udp-"
|
||||
|
||||
@@ -140,8 +141,9 @@ class TTLSTest(LFCliBase):
|
||||
self.l3_cx_obj_udp.cx_profile.side_b_min_pdu = 1500
|
||||
self.l3_cx_obj_udp.cx_profile.report_timer = 1000
|
||||
|
||||
self.l3_cx_obj_tcp = IPVariableTime(host=self.host, port=self.port,
|
||||
create_sta=False, sta_list=self.sta_list, traffic_type="lf_tcp",
|
||||
self.l3_cx_obj_tcp = IPVariableTime(host=self.host, port=self.port, radio=self.radio,
|
||||
ssid=self.ssid, password=self.password, security=self.security,
|
||||
use_existing_sta=False, sta_list=self.sta_list, traffic_type="lf_tcp",
|
||||
upstream=self.upstream_port)
|
||||
self.l3_cx_obj_tcp.cx_profile.name_prefix = "tcp-"
|
||||
self.l3_cx_obj_tcp.cx_profile.side_a_min_bps = 128000
|
||||
@@ -152,13 +154,15 @@ class TTLSTest(LFCliBase):
|
||||
self.l3_cx_obj_tcp.cx_profile.side_b_min_pdu = 1500
|
||||
self.l3_cx_obj_tcp.cx_profile.report_timer = 1000
|
||||
|
||||
def build(self, extra_securities=[]):
|
||||
def build(self,
|
||||
extra_securities=None):
|
||||
# Build stations
|
||||
keyphrase = "[BLANK]"
|
||||
|
||||
self.station_profile.use_security(self.security, self.ssid, passwd=self.password)
|
||||
for security in extra_securities:
|
||||
self.station_profile.add_security_extra(security=security)
|
||||
if extra_securities is not None:
|
||||
for security in extra_securities:
|
||||
self.station_profile.add_security_extra(security=security)
|
||||
if self.vap:
|
||||
self.vap_profile.use_security(self.security, self.ssid, passwd=self.password)
|
||||
self.station_profile.set_number_template(self.number_template)
|
||||
@@ -336,35 +340,23 @@ test_ipv4_ttls.py:
|
||||
--debug
|
||||
|
||||
''')
|
||||
required = None
|
||||
for agroup in parser._action_groups:
|
||||
if agroup.title == "required arguments":
|
||||
required = agroup
|
||||
# if required is not None:
|
||||
|
||||
optional = None
|
||||
for agroup in parser._action_groups:
|
||||
if agroup.title == "optional arguments":
|
||||
optional = agroup
|
||||
|
||||
if optional is not None:
|
||||
optional.add_argument('--a_min', help='--a_min bps rate minimum for side_a', default=256000)
|
||||
optional.add_argument('--b_min', help='--b_min bps rate minimum for side_b', default=256000)
|
||||
optional.add_argument('--test_duration', help='--test_duration sets the duration of the test', default="5m")
|
||||
optional.add_argument('--key-mgmt', help="--key-mgt: { %s }" % ", ".join(realm.wpa_ent_list()),
|
||||
default="WPA-EAP")
|
||||
optional.add_argument('--wpa_psk', help='wpa-ent pre shared key', default="[BLANK]")
|
||||
optional.add_argument('--eap', help='--eap eap method to use', default="TTLS")
|
||||
optional.add_argument('--identity', help='--identity eap identity string', default="testuser")
|
||||
optional.add_argument('--ttls_passwd', help='--ttls_passwd eap password string', default="testpasswd")
|
||||
optional.add_argument('--ttls_realm', help='--ttls_realm 802.11u home realm to use',
|
||||
default="localhost.localdomain")
|
||||
optional.add_argument('--domain', help='--domain 802.11 domain to use', default="localhost.localdomain")
|
||||
optional.add_argument('--hessid', help='--hessid 802.11u HESSID (MAC addr format/peer for WDS)',
|
||||
default="00:00:00:00:00:01")
|
||||
optional.add_argument('--ieee80211w', help='--ieee80211w <disabled(0),optional(1),required(2)', default='1')
|
||||
optional.add_argument('--use_hs20', help='use HotSpot 2.0', default=False)
|
||||
optional.add_argument('--enable_pkc', help='enable opportunistic PMKSA WPA2 key caching', default=False)
|
||||
parser.add_argument('--a_min', help='--a_min bps rate minimum for side_a', default=256000)
|
||||
parser.add_argument('--b_min', help='--b_min bps rate minimum for side_b', default=256000)
|
||||
parser.add_argument('--test_duration', help='--test_duration sets the duration of the test', default="5m")
|
||||
parser.add_argument('--key-mgmt', help="--key-mgt: { %s }" % ", ".join(realm.wpa_ent_list()), default="WPA-EAP")
|
||||
parser.add_argument('--wpa_psk', help='wpa-ent pre shared key', default="[BLANK]")
|
||||
parser.add_argument('--eap', help='--eap eap method to use', default="TTLS")
|
||||
parser.add_argument('--identity', help='--identity eap identity string', default="testuser")
|
||||
parser.add_argument('--ttls_passwd', help='--ttls_passwd eap password string', default="testpasswd")
|
||||
parser.add_argument('--ttls_realm', help='--ttls_realm 802.11u home realm to use', default="localhost.localdomain")
|
||||
parser.add_argument('--domain', help='--domain 802.11 domain to use', default="localhost.localdomain")
|
||||
parser.add_argument('--hessid', help='--hessid 802.11u HESSID (MAC addr format/peer for WDS)',
|
||||
default="00:00:00:00:00:01")
|
||||
parser.add_argument('--ieee80211w', help='--ieee80211w <disabled(0),optional(1),required(2)', default='1')
|
||||
parser.add_argument('--use_hs20', help='use HotSpot 2.0', default=False)
|
||||
parser.add_argument('--enable_pkc', help='enable opportunistic PMKSA WPA2 key caching', default=False)
|
||||
parser.add_argument('--vap', help='Create VAP on host device', default=True)
|
||||
args = parser.parse_args()
|
||||
num_sta = 2
|
||||
if (args.num_stations is not None) and (int(args.num_stations) > 0):
|
||||
@@ -372,7 +364,8 @@ test_ipv4_ttls.py:
|
||||
num_sta = num_stations_converted
|
||||
|
||||
station_list = LFUtils.portNameSeries(prefix_="sta", start_id_=0, end_id_=num_sta - 1, padding_number_=10000)
|
||||
ttls_test = TTLSTest(host=args.mgr, port=args.mgr_port,
|
||||
ttls_test = TTLSTest(host=args.mgr,
|
||||
port=args.mgr_port,
|
||||
ssid=args.ssid,
|
||||
password=args.passwd,
|
||||
security=args.security,
|
||||
@@ -381,7 +374,7 @@ test_ipv4_ttls.py:
|
||||
key_mgmt=args.key_mgmt,
|
||||
wpa_psk=args.wpa_psk,
|
||||
eap=args.eap,
|
||||
vap=True,
|
||||
vap=args.vap,
|
||||
identity=args.identity,
|
||||
ttls_passwd=args.ttls_passwd,
|
||||
ttls_realm=args.ttls_realm,
|
||||
|
||||
Reference in New Issue
Block a user