mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 11:18:03 +00:00
cv-dut: Improve options to configure DUT.
And stop hard-coding the DUT position. Add start of ferndale ucentral testbed end-to-end example test script. Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
@@ -68,21 +68,23 @@ class DUT(dut):
|
||||
port="8080",
|
||||
dut_name="DUT",
|
||||
ssid=[],
|
||||
password=[],
|
||||
bssid=[],
|
||||
security=[]
|
||||
sw_version="NA",
|
||||
hw_version="NA",
|
||||
serial_num="NA",
|
||||
model_num="NA",
|
||||
):
|
||||
super().__init__(
|
||||
lfclient_host=lfmgr,
|
||||
lfclient_port=port,
|
||||
sw_version=sw_version,
|
||||
hw_version=hw_version,
|
||||
serial_num=serial_num,
|
||||
model_num=model_num,
|
||||
)
|
||||
self.cv_dut_name = dut_name
|
||||
self.cv_test = cvtest(lfmgr, port)
|
||||
self.dut_name = dut_name
|
||||
self.ssid = ssid
|
||||
self.password = password
|
||||
self.bssid = bssid
|
||||
self.security = security
|
||||
|
||||
def setup(self):
|
||||
self.create_dut()
|
||||
@@ -150,11 +152,20 @@ def main():
|
||||
parser.add_argument("-s", "--ssid", action='append', nargs=1,
|
||||
help="SSID", default=[])
|
||||
|
||||
parser.add_argument("--sw_version", default="NA", help="DUT Software version.")
|
||||
parser.add_argument("--hw_version", default="NA", help="DUT Hardware version.")
|
||||
parser.add_argument("--serial_num", default="NA", help="DUT Serial number.")
|
||||
parser.add_argument("--model_num", default="NA", help="DUT Model Number.")
|
||||
|
||||
args = parser.parse_args()
|
||||
new_dut = DUT(args.lfmgr,
|
||||
args.port,
|
||||
args.dut_name,
|
||||
args.ssid,
|
||||
new_dut = DUT(lfmgr=args.lfmgr,
|
||||
port=args.port,
|
||||
dut_name=args.dut_name,
|
||||
ssid=args.ssid,
|
||||
sw_version = args.sw_version,
|
||||
hw_version = args.hw_version,
|
||||
serial_num = args.serial_num,
|
||||
model_num = args.model_num,
|
||||
)
|
||||
|
||||
new_dut.setup()
|
||||
|
||||
46
py-scripts/cv_examples/ferndale_ucentral.bash
Executable file
46
py-scripts/cv_examples/ferndale_ucentral.bash
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This bash script creates/updates a DUT, creates/updates a chamberview scenario,
|
||||
# loads and builds that scenario, runs wifi capacity test, and saves the kpi.csv info
|
||||
# into influxdb. As final step, it builds a grafana dashboard for the KPI information.
|
||||
|
||||
# Define some common variables. This will need to be changed to match your own testbed.
|
||||
# LANforge GUI machine
|
||||
#MGR=192.168.100.209
|
||||
MGR=localhost
|
||||
INFLUXTOKEN=-u_Wd-L8o992701QF0c5UmqEp7w7Z7YOMaWLxOMgmHfATJGnQbbmYyNxHBR9PgD6taM_tcxqJl6U8DjU1xINFQ==
|
||||
TESTBED=Ferndale-01
|
||||
GRAFANATOKEN=eyJrIjoiVXVyZ0dQSXlNdGlQNGQ1R282S2p6SE1PZXJVOVpvM1UiLCJuIjoiYmVuLWdyYWZhbmEiLCJpZCI6MX0=
|
||||
GROUPS=/tmp/lf_cv_rpt_filelocation.txt
|
||||
DUT=linksys-8450
|
||||
|
||||
# Create/update new DUT.
|
||||
#Replace my arguments with your setup. Separate your ssid arguments with spaces and ensure the names are lowercase
|
||||
echo "Make new DUT"
|
||||
./create_chamberview_dut.py --lfmgr ${MGR} --dut_name ${DUT} \
|
||||
--ssid "ssid_idx=0 ssid=Default-SSID-2g security=WPA2 password=12345678 bssid=c4:41:1e:f5:3f:24" \
|
||||
--ssid "ssid_idx=1 ssid=Default-SSID-5gl security=WPA2 password=12345678 bssid=c4:41:1e:f5:3f:25" \
|
||||
--sw_version "ucentral-01" --hw_version ea8450 --serial_num 1001 --model_num 8450
|
||||
|
||||
exit 0
|
||||
|
||||
# Create/update chamber view scenario and apply and build it.
|
||||
echo "Build Chamber View Scenario"
|
||||
#change the lfmgr to your system, set the radio to a working radio on your LANforge system, same with the ethernet port.
|
||||
./create_chamberview.py --lfmgr ${MGR} --create_scenario DUT_TO_GRAFANA_SCENARIO \
|
||||
--line "Resource=1.1 Profile=default Amount=32 Uses-1=wiphy1 DUT=DUT_TO_GRAFANA_DUT Traffic=wiphy1 Freq=-1" \
|
||||
--line "Resource=1.1 Profile=upstream Amount=1 Uses-1=eth1 DUT=DUT_TO_GRAFANA_DUT Traffic=eth1 Freq=-1"
|
||||
|
||||
# Run capacity test on the stations created by the chamber view scenario.
|
||||
# Submit the KPI data into the influxdb.
|
||||
#config_name doesn't matter, change the influx_host to your LANforge device,
|
||||
echo "run wifi capacity test"
|
||||
./lf_wifi_capacity_test.py --config_name Custom --create_stations --radio wiphy1 --pull_report --influx_host ${MGR} \
|
||||
--influx_port 8086 --influx_org Candela --influx_token ${INFLUXTOKEN} --influx_bucket lanforge --mgr ${MGR} \
|
||||
--instance_name testing --upstream eth1 --test_rig ${TESTBED} --graphgroups ${GROUPS}
|
||||
|
||||
# Build grafana dashboard and graphs view for the KPI in the capacity test.
|
||||
./grafana_profile.py --create_custom --title ${TESTBED} --influx_bucket lanforge --mgr 192.168.1.7 --grafana_token ${GRAFANATOKEN} \
|
||||
--grafana_host 192.168.1.7 --testbed ${TESTBED} --graph-groups ${GROUPS} --scripts Dataplane --scripts 'WiFi Capacity'
|
||||
|
||||
rm ${GROUPS}
|
||||
Reference in New Issue
Block a user