2 Documentation Test suite for H2 DataStore FlowGroup Stats Verification
3 Suite Setup Run Keywords Start TSDR suite with CPqD Switch Configuration of FlowGroup on Switch
4 Suite Teardown Stop Tsdr Suite
8 Library ../../../libraries/Common.py
9 Resource ../../../libraries/KarafKeywords.robot
10 Resource ../../../libraries/TsdrUtils.robot
11 Variables ../../../variables/Variables.py
14 @{FLOWGROUP_METRICS} ByteCount PacketCount RefCount
15 ${TSDR_FLOWGROUPSTATS} tsdr:list FlowGroupStats
16 @{FLOWGROUP_HEADER} MetricName MetricValue MetricCategory MetricDetails
19 Verify the FlowGroup Stats attributes exist thru Karaf console
20 [Documentation] Verify the FlowGroupStats attributes exist on Karaf Console
21 Wait Until Keyword Succeeds 120s 1s Verify the Metric is Collected? ${TSDR_FLOWGROUPSTATS} ByteCount
22 ${output}= Issue Command On Karaf Console ${TSDR_FLOWGROUPSTATS} ${CONTROLLER} ${KARAF_SHELL_PORT} 30
23 : FOR ${list} IN @{FLOWGROUP_METRICS}
24 \ Should Contain ${output} ${list}
26 Verification of FlowGroupStats-ByteCount on Karaf Console
27 [Documentation] Verify the FlowGroupStats has been updated thru tsdr:list command on karaf console
28 ${tsdr_cmd}= Concatenate the String ${TSDR_FLOWGROUPSTATS} | grep ByteCount | head
29 ${output}= Issue Command On Karaf Console ${tsdr_cmd} ${CONTROLLER} ${KARAF_SHELL_PORT} 90
30 Should Contain ${output} ByteCount
31 Should Contain ${output} FLOWGROUPSTATS
32 Should not Contain ${output} null
33 : FOR ${list} IN @{FLOWGROUP_HEADER}
34 \ Should Contain ${output} ${list}
36 Verify FlowGroupStats-Attributes on H2 Datastore using JDBC Client
37 [Documentation] Verify the GroupStats,attributes on H2 Datastore using JDBC Client
38 : FOR ${list} IN @{FLOWGROUP_METRICS}
39 \ ${output}= Query Metrics on H2 Datastore FLOWGROUPSTATS ${list}
40 \ Should Contain ${output} ${list}
43 Start TSDR suite with CPqD Switch
46 Configuration of FlowGroup on Switch
47 [Documentation] FlowGroup configuration on CPqD
48 Run Command On Remote System ${MININET} sudo dpctl unix:/tmp/s1 group-mod cmd=add,group=1,type=all
49 Run Command On Remote System ${MININET} sudo dpctl unix:/tmp/s1 flow-mod table=0,cmd=add eth_type=0x800,eth_src=00:01:02:03:04:05 apply:group=1
50 Run Command On Remote System ${MININET} sudo dpctl unix:/tmp/s1 ping 10
51 Run Command On Remote System ${MININET} sudo dpctl unix:/tmp/s2 ping 10