2 Documentation Test suite for Cassandra DataStore Flow Table Stats Verification
3 Suite Setup Initialize the Tsdr Suite
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 ${TSDR_FLOWTABLE_STATS} tsdr:list FlowTableStats
18 ${packetlookup} flow-table-statistics/packets-looked-up
19 ${activeflows} flow-table-statistics/active-flows
20 ${packetmatched} flow-table-statistics/packets-matched
21 @{openflow_packetlookup}
22 @{openflow_activeflows}
23 @{openflow_packetmatched}
27 Verification of TSDR Cassandra Feature Installation
28 [Documentation] Install and Verify the TSDR Cassandra Features
29 COMMENT Install a Feature odl-tsdr-cassandra-all ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 60
30 Verify Feature Is Installed odl-tsdr-cassandra
31 COMMENT Verify Feature Is Installed odl-tsdr-cassandra-persistence
32 Verify Feature Is Installed odl-tsdr-openflow-statistics-collector
35 Wait Until Keyword Succeeds 5x 30 sec Check Metric path 24\\d+|25\\d+
36 Wait Until Keyword Succeeds 5x 30 sec Check Metric val \\d{5}
39 Getting all Tables from Openflow Plugin
40 [Documentation] Getting Flow Table Stats Values from Openflow plugin
41 ${ret}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/ ${packetlookup}
42 Append To List ${openflow_packetlookup} ${ret}
43 ${ret}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/ ${packetlookup}
44 Append To List ${openflow_packetlookup} ${ret}
45 ${ret}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/ ${packetlookup}
46 Append To List ${openflow_packetlookup} ${ret}
48 Set Suite Variable @{openflow_packetlookup}
51 ${ret}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/ ${activeflows}
52 Append To List ${openflow_activeflows} ${ret}
53 ${ret}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/ ${activeflows}
54 Append To List ${openflow_activeflows} ${ret}
55 ${ret}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/ ${activeflows}
56 Append To List ${openflow_activeflows} ${ret}
58 Set Suite Variable @{openflow_activeflows}
60 ${ret}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/ ${packetmatched}
61 Append To List ${openflow_packetmatched} ${ret}
62 ${ret}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/ ${packetmatched}
63 Append To List ${openflow_packetmatched} ${ret}
64 ${ret}= Get Stats XML ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/ ${packetmatched}
65 Append To List ${openflow_packetmatched} ${ret}
67 Set Suite Variable @{openflow_packetmatched}
72 Verification of FlowStats-Attributes on Cassandra Data Store
73 [Documentation] Verify the InterfaceMetrics has been updated on Cassandra Data Store
75 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:1 | grep DC=FLOWTABLESTATS | grep MN=PacketLookup | grep RK=Node:openflow:1,Table:0
76 Append To List ${tsdr_pl} ${ret_val1}
77 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:2 | grep DC=FLOWTABLESTATS | grep MN=PacketLookup | grep RK=Node:openflow:2,Table:0
78 Append To List ${tsdr_pl} ${ret_val1}
79 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:3 | grep DC=FLOWTABLESTATS | grep MN=PacketLookup | grep RK=Node:openflow:3,Table:0
80 Append To List ${tsdr_pl} ${ret_val1}
84 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:1 | grep DC=FLOWTABLESTATS | grep MN=ActiveFlows | grep RK=Node:openflow:1,Table:0
85 Append To List ${tsdr_af} ${ret_val1}
86 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:2 | grep DC=FLOWTABLESTATS | grep MN=ActiveFlows | grep RK=Node:openflow:2,Table:0
87 Append To List ${tsdr_af} ${ret_val1}
88 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:3 | grep DC=FLOWTABLESTATS | grep MN=ActiveFlows | grep RK=Node:openflow:3,Table:0
89 Append To List ${tsdr_af} ${ret_val1}
92 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:1 | grep DC=FLOWTABLESTATS | grep MN=PacketMatch | grep RK=Node:openflow:1,Table:0
93 Append To List ${tsdr_pm} ${ret_val1}
94 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:2 | grep DC=FLOWTABLESTATS | grep MN=PacketMatch | grep RK=Node:openflow:2,Table:0
95 Append To List ${tsdr_pm} ${ret_val1}
96 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:3 | grep DC=FLOWTABLESTATS | grep MN=PacketMatch | grep RK=Node:openflow:3,Table:0
97 Append To List ${tsdr_pm} ${ret_val1}
102 Comparing Flow Table Metrics
103 [Documentation] Comparing Flow table values between Cassandra and openflow plugin.
105 : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_packetlookup} ${tsdr_pl}
106 \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 5
108 : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_activeflows} ${tsdr_af}
109 \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 5
111 : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_packetmatched} ${tsdr_pm}
112 \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 5
117 Initialize the Tsdr Suite
118 COMMENT Initialize the Cassandra for TSDR
119 Initialize Cassandra Tables Metricval