mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
cv automation work.
Improve ferndale_ucentral.bash to at least mostly work. Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
@@ -158,9 +158,11 @@ class CreateChamberview(cv):
|
|||||||
while (True):
|
while (True):
|
||||||
self.get_popup_info_and_close()
|
self.get_popup_info_and_close()
|
||||||
if not self.get_cv_is_built():
|
if not self.get_cv_is_built():
|
||||||
print("Waiting %i/60 for Chamber-View to be built." % (tries))
|
# It can take a while to build a large scenario, so wait-time
|
||||||
|
# is currently max of 5 minutes.
|
||||||
|
print("Waiting %i/300 for Chamber-View to be built." % (tries))
|
||||||
tries += 1
|
tries += 1
|
||||||
if (tries > 60):
|
if (tries > 300):
|
||||||
break
|
break
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -4,15 +4,22 @@
|
|||||||
# loads and builds that scenario, runs wifi capacity test, and saves the kpi.csv info
|
# 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.
|
# into influxdb. As final step, it builds a grafana dashboard for the KPI information.
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
# Define some common variables. This will need to be changed to match your own testbed.
|
# Define some common variables. This will need to be changed to match your own testbed.
|
||||||
# LANforge GUI machine
|
# MGR is LANforge GUI machine
|
||||||
#MGR=192.168.100.209
|
#MGR=192.168.100.209
|
||||||
MGR=localhost
|
MGR=localhost
|
||||||
INFLUXTOKEN=-u_Wd-L8o992701QF0c5UmqEp7w7Z7YOMaWLxOMgmHfATJGnQbbmYyNxHBR9PgD6taM_tcxqJl6U8DjU1xINFQ==
|
INFLUXTOKEN=-u_Wd-L8o992701QF0c5UmqEp7w7Z7YOMaWLxOMgmHfATJGnQbbmYyNxHBR9PgD6taM_tcxqJl6U8DjU1xINFQ==
|
||||||
TESTBED=Ferndale-01
|
INFLUX_HOST=192.168.100.201
|
||||||
|
INFLUX_BUCKET=ben
|
||||||
GRAFANATOKEN=eyJrIjoiVXVyZ0dQSXlNdGlQNGQ1R282S2p6SE1PZXJVOVpvM1UiLCJuIjoiYmVuLWdyYWZhbmEiLCJpZCI6MX0=
|
GRAFANATOKEN=eyJrIjoiVXVyZ0dQSXlNdGlQNGQ1R282S2p6SE1PZXJVOVpvM1UiLCJuIjoiYmVuLWdyYWZhbmEiLCJpZCI6MX0=
|
||||||
|
GRAFANA_HOST=192.168.100.201
|
||||||
GROUPS=/tmp/lf_cv_rpt_filelocation.txt
|
GROUPS=/tmp/lf_cv_rpt_filelocation.txt
|
||||||
|
TESTBED=Ferndale-01
|
||||||
DUT=linksys-8450
|
DUT=linksys-8450
|
||||||
|
UPSTREAM=eth2
|
||||||
|
LF_WAN_PORT=eth3
|
||||||
|
|
||||||
# Create/update new DUT.
|
# Create/update new DUT.
|
||||||
#Replace my arguments with your setup. Separate your ssid arguments with spaces and ensure the names are lowercase
|
#Replace my arguments with your setup. Separate your ssid arguments with spaces and ensure the names are lowercase
|
||||||
@@ -22,25 +29,35 @@ echo "Make new DUT"
|
|||||||
--ssid "ssid_idx=1 ssid=Default-SSID-5gl security=WPA2 password=12345678 bssid=c4:41:1e:f5:3f:25" \
|
--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
|
--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.
|
# Create/update chamber view scenario and apply and build it.
|
||||||
|
# Easiest way to get these lines is to build it in the GUI and then
|
||||||
|
# copy/tweak what it shows in the 'Text Output' tab after saving and re-opening
|
||||||
|
# the scenario.
|
||||||
echo "Build Chamber View Scenario"
|
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.
|
#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 \
|
./create_chamberview.py --lfmgr ${MGR} --create_scenario ucentral-scenario \
|
||||||
--line "Resource=1.1 Profile=default Amount=32 Uses-1=wiphy1 DUT=DUT_TO_GRAFANA_DUT Traffic=wiphy1 Freq=-1" \
|
--raw_line "profile_link 1.1 STA-AC 50 'DUT: $DUT Radio-1' NA wiphy0,AUTO -1 NA" \
|
||||||
--line "Resource=1.1 Profile=upstream Amount=1 Uses-1=eth1 DUT=DUT_TO_GRAFANA_DUT Traffic=eth1 Freq=-1"
|
--raw_line "profile_link 1.1 STA-AC 50 'DUT: $DUT Radio-1' NA wiphy2,AUTO -1 NA" \
|
||||||
|
--raw_line "profile_link 1.1 STA-AC 50 'DUT: $DUT Radio-2' NA wiphy1,AUTO -1 NA" \
|
||||||
|
--raw_line "profile_link 1.1 STA-AC 46 'DUT: $DUT Radio-2' NA wiphy3,AUTO -1 NA" \
|
||||||
|
--raw_line "profile_link 1.1 upstream-dhcp 1 NA NA $UPSTREAM,AUTO -1 NA" \
|
||||||
|
--raw_line "profile_link 1.1 uplink-nat 1 'DUT: upstream LAN 192.168.100.1/24' NA $LF_WAN_PORT,$UPSTREAM -1 NA" \
|
||||||
|
--raw_line "profile_link 1.1 STA-AC 1 'DUT: $DUT Radio-2' NA ALL-AX,AUTO -1 NA"
|
||||||
|
|
||||||
# Run capacity test on the stations created by the chamber view scenario.
|
# Run capacity test on the stations created by the chamber view scenario.
|
||||||
# Submit the KPI data into the influxdb.
|
# Submit the KPI data into the influxdb.
|
||||||
#config_name doesn't matter, change the influx_host to your LANforge device,
|
#config_name doesn't matter, change the influx_host to your LANforge device,
|
||||||
|
# NOTE: My influx token is unlucky and starts with a '-', but using the syntax below
|
||||||
|
# with '=' right after the argument keyword works as hoped.
|
||||||
echo "run wifi capacity test"
|
echo "run wifi capacity test"
|
||||||
./lf_wifi_capacity_test.py --config_name Custom --create_stations --radio wiphy1 --pull_report --influx_host ${MGR} \
|
./lf_wifi_capacity_test.py --config_name Custom --pull_report --influx_host ${INFLUX_HOST} \
|
||||||
--influx_port 8086 --influx_org Candela --influx_token ${INFLUXTOKEN} --influx_bucket lanforge --mgr ${MGR} \
|
--influx_port 8086 --influx_org Candela --influx_token=${INFLUXTOKEN} --influx_bucket ${INFLUX_BUCKET} --mgr ${MGR} \
|
||||||
--instance_name testing --upstream eth1 --test_rig ${TESTBED} --graphgroups ${GROUPS}
|
--instance_name testing --upstream 1.1.$UPSTREAM --test_rig ${TESTBED} --graphgroups ${GROUPS} \
|
||||||
|
--batch_size "1,5,25,50,100" --protocol "TCP-IPv4" --duration 20000
|
||||||
|
|
||||||
# Build grafana dashboard and graphs view for the KPI in the capacity test.
|
# 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} \
|
echo "Adding grafana dashboard"
|
||||||
--grafana_host 192.168.1.7 --testbed ${TESTBED} --graph-groups ${GROUPS} --scripts Dataplane --scripts 'WiFi Capacity'
|
./grafana_profile.py --create_custom --title ${TESTBED} --influx_bucket ${INFLUX_BUCKET} --grafana_token ${GRAFANATOKEN} \
|
||||||
|
--grafana_host ${GRAFANA_HOST} --testbed ${TESTBED} --graph-groups ${GROUPS} --scripts Dataplane --scripts 'WiFi Capacity'
|
||||||
|
|
||||||
rm ${GROUPS}
|
rm ${GROUPS}
|
||||||
|
|||||||
Reference in New Issue
Block a user