Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

Commit 62f62c6

Browse files
committed
test: test_flowys.py added test_ap_metrics_interval_response
added test for ap metrics query/response tests that there is exactly one response from each agent within the time of the interval MAP-4.7.4_ETH_FH24G:netgear-rax40 MAP-4.7.4_ETH_FH5GL:netgear-rax40 MAP-4.7.4_ETH_FH5GH:netgear-rax40 MAP-4.7.5_ETH_FH24G:netgear-rax40 MAP-4.7.5_ETH_FH5GL:netgear-rax40 MAP-4.7.5_ETH_FH5GH:netgear-rax40 MAP-4.7.6_ETH_FH24G:netgear-rax40 MAP-4.7.6_ETH_FH5GL:netgear-rax40 MAP-4.7.6_ETH_FH5GH:netgear-rax40 Signed-off-by: Ran Regev <ran.regev@devalore.com>
1 parent d2e2989 commit 62f62c6

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

tests/test_flows.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,68 @@ def test_beacon_report_query(self):
11891189
# r"inserting 1 RRM_EVENT_BEACON_REP_RXED event(s) to the pending list")
11901190
env.agents[0].radios[0].vaps[0].disassociate(sta)
11911191

1192+
def test_ap_metrics_interval_response(self):
1193+
# Trigger(
1194+
# DEV_SEND_1905,DestAL id,
1195+
# WTS_REPLACE_DEST_A LID,
1196+
# MessageTypeValue,0x8003,
1197+
# tlv_type,0x8A,
1198+
# tlv_length,0x000C,
1199+
# tlv_value,{0x05 0x01 {WTS_REPLACE_MAUT_RUID 0x00 0x00 0x00 0xC0})
1200+
1201+
# set vaps for both agents
1202+
for agent in range(0, 2):
1203+
env.beerocks_cli_command('bml_clear_wifi_credentials {}'.format(env.agents[agent].mac))
1204+
env.beerocks_cli_command('bml_set_wifi_credentials {} {} {} {} {}'
1205+
.format(env.agents[agent].mac,
1206+
"Multi-AP-24G-3-cli", "maprocks1", "24g", "fronthaul"))
1207+
env.beerocks_cli_command('bml_update_wifi_credentials {}'.format(env.agents[agent].mac))
1208+
1209+
# create and associate stations
1210+
1211+
sta1 = env.Station.create()
1212+
debug("Connect dummy STA (" + sta1.mac + ") to wlan0")
1213+
env.agents[0].radios[0].vaps[0].associate(sta1)
1214+
1215+
sta2 = env.Station.create()
1216+
debug("Connect dummy STA (" + sta2.mac + ") to wlan2")
1217+
env.agents[1].radios[1].vaps[0].associate(sta2)
1218+
1219+
debug("sending multi-ap policy config request")
1220+
1221+
# in seconds
1222+
interval_time = 5
1223+
tlv_value = '0x{:02} 0x01 0x{ruid} 0x00 0x00 0x00 0xC0'.format(
1224+
interval_time, ruid=env.agents[0].radios[0].mac.replace(':', ''))
1225+
1226+
debug(tlv_value)
1227+
1228+
# sending two commands to the controller, for each agent
1229+
env.controller.dev_send_1905(env.agents[0].mac, 0x8003,
1230+
tlv(0x8A, 0x000C, "{" + tlv_value + "}"))
1231+
1232+
env.controller.dev_send_1905(env.agents[1].mac, 0x8003,
1233+
tlv(0x8A, 0x000C, "{" + tlv_value + "}"))
1234+
1235+
# wait for ACK
1236+
time.sleep(1)
1237+
self.check_cmdu_type_single("ACK", 0x8000, env.agents[0].mac, env.controller.mac)
1238+
self.check_cmdu_type_single("ACK", 0x8000, env.agents[1].mac, env.controller.mac)
1239+
1240+
# wait for report
1241+
# since it is a periodic report and we want to verify that
1242+
# we have only _one_ response, we wait for a time correlated with the request itself
1243+
time.sleep(interval_time + interval_time/2)
1244+
1245+
# expect two single reports
1246+
self.check_cmdu_type_single("ap metrics response agent1", 0x800C,
1247+
env.agents[0].mac, env.controller.mac)
1248+
self.check_cmdu_type_single("ap metrics response agent2", 0x800C,
1249+
env.agents[1].mac, env.controller.mac)
1250+
1251+
env.agents[0].radios[0].vaps[0].disassociate(sta1)
1252+
env.agents[0].radios[0].vaps[0].disassociate(sta2)
1253+
11921254

11931255
if __name__ == '__main__':
11941256
t = TestFlows()

0 commit comments

Comments
 (0)