mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
optional number_template argument in create_l3
Signed-off-by: Matthew Stidham <stidmatt@protonmail.com>
This commit is contained in:
@@ -24,6 +24,7 @@ import time
|
||||
import datetime
|
||||
from realm import TestGroupProfile
|
||||
|
||||
|
||||
class CreateL3(Realm):
|
||||
def __init__(self,
|
||||
ssid, security, password, sta_list, name_prefix, upstream, radio,
|
||||
@@ -64,7 +65,6 @@ class CreateL3(Realm):
|
||||
self.station_profile.set_command_param("add_sta", "ap", self.ap)
|
||||
# self.station_list= LFUtils.portNameSeries(prefix_="sta", start_id_=0, end_id_=2, padding_number_=10000, radio='wiphy0') #Make radio a user defined variable from terminal.
|
||||
|
||||
|
||||
self.cx_profile.host = self.host
|
||||
self.cx_profile.port = self.port
|
||||
self.cx_profile.name_prefix = self.name_prefix
|
||||
@@ -78,7 +78,6 @@ class CreateL3(Realm):
|
||||
for sta in self.sta_list:
|
||||
self.rm_port(sta, check_exists=True)
|
||||
|
||||
|
||||
def build(self):
|
||||
|
||||
self.station_profile.use_security(self.security,
|
||||
@@ -98,6 +97,7 @@ class CreateL3(Realm):
|
||||
sleep_time=0)
|
||||
self._pass("PASS: Station build finished")
|
||||
|
||||
|
||||
def main():
|
||||
parser = LFCliBase.create_basic_argparse(
|
||||
prog='create_l3.py',
|
||||
@@ -136,6 +136,7 @@ python3 ./test_ipv4_variable_time.py
|
||||
--a_min 1000
|
||||
--b_min 1000
|
||||
--ap "00:0e:8e:78:e1:76"
|
||||
--number_template 0000
|
||||
--debug
|
||||
''')
|
||||
|
||||
@@ -156,16 +157,18 @@ python3 ./test_ipv4_variable_time.py
|
||||
if optional_args is not None:
|
||||
optional_args.add_argument('--mode', help='Used to force mode of stations')
|
||||
optional_args.add_argument('--ap', help='Used to force a connection to a particular AP')
|
||||
optional_args.add_argument('--number_template', help='Start the station numbering with a particular number. Default is 0000', default=0000)
|
||||
args = parser.parse_args()
|
||||
|
||||
num_sta = 2
|
||||
if (args.num_stations is not None) and (int(args.num_stations) > 0):
|
||||
num_sta = int(args.num_stations)
|
||||
|
||||
station_list = LFUtils.portNameSeries(prefix_="sta", start_id_=0, end_id_=num_sta-1, padding_number_=10000, radio=args.radio)
|
||||
station_list = LFUtils.portNameSeries(prefix_="sta", start_id_=0, end_id_=num_sta - 1, padding_number_=10000,
|
||||
radio=args.radio)
|
||||
ip_var_test = CreateL3(host=args.mgr,
|
||||
port=args.mgr_port,
|
||||
number_template="0000",
|
||||
number_template=str(args.number_template),
|
||||
sta_list=station_list,
|
||||
name_prefix="VT",
|
||||
upstream=args.upstream_port,
|
||||
|
Reference in New Issue
Block a user