2 Documentation Test suite for Cassandra DataStore Flow 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
15 @{FLOW_METRICS} PacketCount ByteCount
16 ${TSDR_FLOWSTATS} tsdr:list FlowStats
17 ${packet_count} flow/flow-statistics/packet-count
18 ${byte_count} flow/flow-statistics/byte-count
32 Verification of TSDR Cassandra Feature Installation
33 [Documentation] Install and Verify the TSDR Cassandra Features
34 Verify Feature Is Installed odl-tsdr-cassandra
35 Verify Feature Is Installed odl-tsdr-openflow-statistics-collector
38 Wait Until Keyword Succeeds 5x 30 sec Check Metric path 24\\d+|25\\d+
39 Wait Until Keyword Succeeds 5x 30 sec Check Metric val \\d{5}
42 Getting all Tables from Openflow Plugin
43 [Documentation] Getting Flowstats from openflow plugin
45 @{openflow_1}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/ flow/id
46 @{openflow_2}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/ flow/id
47 @{openflow_3}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/ flow/id
49 Set Suite Variable @{openflow_1}
50 Set Suite Variable @{openflow_2}
51 Set Suite Variable @{openflow_3}
53 @{openflow_1_packetcount}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/ ${packet_count}
54 @{openflow_2_packetcount}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/ ${packet_count}
55 @{openflow_3_packetcount}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/ ${packet_count}
57 Set Suite Variable @{openflow_1_packetcount}
58 Set Suite Variable @{openflow_2_packetcount}
59 Set Suite Variable @{openflow_3_packetcount}
62 @{openflow_1_bytecount}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/ ${byte_count}
63 @{openflow_2_bytecount}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/ ${byte_count}
64 @{openflow_3_bytecount}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/ ${byte_count}
66 Set Suite Variable @{openflow_1_bytecount}
67 Set Suite Variable @{openflow_2_bytecount}
68 Set Suite Variable @{openflow_3_bytecount}
70 Verification of FlowStats-Attributes on Cassandra Data Store
71 [Documentation] Verify the InterfaceMetrics has been updated on Cassandra Data Store
73 : FOR ${flow} IN @{openflow_1}
74 \ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:1 | grep DC=FLOWSTATS | grep MN=PacketCount | grep -F 'RK=Node:openflow:1,Table:0,Flow:${flow}'
75 \ Append To List ${tsdr_op1_pc} ${ret_val1}
77 : FOR ${flow} IN @{openflow_2}
78 \ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:2 | grep DC=FLOWSTATS | grep MN=PacketCount | grep -F 'RK=Node:openflow:2,Table:0,Flow:${flow}'
79 \ Append To List ${tsdr_op2_pc} ${ret_val1}
81 : FOR ${flow} IN @{openflow_3}
82 \ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:3 | grep DC=FLOWSTATS | grep MN=PacketCount | grep -F 'RK=Node:openflow:3,Table:0,Flow:${flow}'
83 \ Append To List ${tsdr_op3_pc} ${ret_val1}
85 : FOR ${flow} IN @{openflow_1}
86 \ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:1 | grep DC=FLOWSTATS | grep MN=ByteCount | grep -F 'RK=Node:openflow:1,Table:0,Flow:${flow}'
87 \ Append To List ${tsdr_op1_bc} ${ret_val1}
89 : FOR ${flow} IN @{openflow_2}
90 \ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:2 | grep DC=FLOWSTATS | grep MN=ByteCount | grep -F 'RK=Node:openflow:2,Table:0,Flow:${flow}'
91 \ Append To List ${tsdr_op2_bc} ${ret_val1}
93 : FOR ${flow} IN @{openflow_3}
94 \ ${ret_val1}= Verify the Metrics Attributes on Cassandra Client grep NID=openflow:3 | grep DC=FLOWSTATS | grep MN=ByteCount | grep -F 'RK=Node:openflow:3,Table:0,Flow:${flow}'
95 \ Append To List ${tsdr_op3_bc} ${ret_val1}
97 Set Suite Variable @{tsdr_op1_pc}
98 Set Suite Variable @{tsdr_op2_pc}
99 Set Suite Variable @{tsdr_op3_pc}
100 Set Suite Variable @{tsdr_op1_bc}
101 Set Suite Variable @{tsdr_op2_bc}
102 Set Suite Variable @{tsdr_op3_bc}
105 Comparing Packet Count Metrics
106 [Documentation] Comparing Packet count values between Cassandra and openflow plugin
108 : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_1_packetcount} ${tsdr_op1_pc}
109 \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
111 : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_2_packetcount} ${tsdr_op2_pc}
112 \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
114 : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_3_packetcount} ${tsdr_op3_pc}
115 \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
119 Comparing Byte Count Metrics
120 [Documentation] Comparing byte count values between Cassandra and openflow plugin
122 : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_1_bytecount} ${tsdr_op1_bc}
123 \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
125 : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_2_bytecount} ${tsdr_op2_bc}
126 \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
128 : FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_3_bytecount} ${tsdr_op3_bc}
129 \ Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
135 Initialize the Tsdr Suite
136 Initialize Cassandra Tables Metricval