2 Documentation Test suite for Cassandra DataStore Flow Stats Verification
7 Library ../../../libraries/Common.py
8 Resource ../../../libraries/KarafKeywords.robot
9 Resource ../../../libraries/TsdrUtils.robot
10 Variables ../../../variables/Variables.py
12 Suite Setup Initialize the Tsdr Suite
13 Suite Teardown Stop Tsdr Suite
17 @{FLOW_METRICS} PacketCount ByteCount
18 ${TSDR_FLOWSTATS} tsdr:list FlowStats
19 ${packet_count} flow/flow-statistics/packet-count
20 ${byte_count} flow/flow-statistics/byte-count
33 Verification of TSDR Cassandra Feature Installation
34 [Documentation] Install and Verify the TSDR Cassandra Features
35 Verify Feature Is Installed odl-tsdr-cassandra
36 Verify Feature Is Installed odl-tsdr-openflow-statistics-collector
39 Wait Until Keyword Succeeds 5x 30 sec Check Metric val \\d{5}
41 Getting all Tables from Openflow Plugin
42 [Documentation] Getting Flowstats from openflow plugin
43 @{openflow_1}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/ flow/id
44 @{openflow_2}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/ flow/id
45 @{openflow_3}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/ flow/id
46 Set Suite Variable @{openflow_1}
47 Set Suite Variable @{openflow_2}
48 Set Suite Variable @{openflow_3}
49 @{openflow_1_packetcount}= Return all XML matches
50 ... ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/
52 @{openflow_2_packetcount}= Return all XML matches
53 ... ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/
55 @{openflow_3_packetcount}= Return all XML matches
56 ... ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/
58 Set Suite Variable @{openflow_1_packetcount}
59 Set Suite Variable @{openflow_2_packetcount}
60 Set Suite Variable @{openflow_3_packetcount}
61 @{openflow_1_bytecount}= Return all XML matches
62 ... ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/
64 @{openflow_2_bytecount}= Return all XML matches
65 ... ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/
67 @{openflow_3_bytecount}= Return all XML matches
68 ... ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/
70 Set Suite Variable @{openflow_1_bytecount}
71 Set Suite Variable @{openflow_2_bytecount}
72 Set Suite Variable @{openflow_3_bytecount}
74 Verification of FlowStats-Attributes on Cassandra Data Store
75 [Documentation] Verify the InterfaceMetrics has been updated on Cassandra Data Store
77 FOR ${flow} IN @{openflow_1}
78 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client
79 ... grep NID=openflow:1 | grep DC=FLOWSTATS | grep MN=PacketCount | grep -F 'RK=Node:openflow:1,Table:0,Flow:${flow}'
80 Append To List ${tsdr_op1_pc} ${ret_val1}
82 FOR ${flow} IN @{openflow_2}
83 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client
84 ... grep NID=openflow:2 | grep DC=FLOWSTATS | grep MN=PacketCount | grep -F 'RK=Node:openflow:2,Table:0,Flow:${flow}'
85 Append To List ${tsdr_op2_pc} ${ret_val1}
87 FOR ${flow} IN @{openflow_3}
88 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client
89 ... grep NID=openflow:3 | grep DC=FLOWSTATS | grep MN=PacketCount | grep -F 'RK=Node:openflow:3,Table:0,Flow:${flow}'
90 Append To List ${tsdr_op3_pc} ${ret_val1}
92 FOR ${flow} IN @{openflow_1}
93 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client
94 ... grep NID=openflow:1 | grep DC=FLOWSTATS | grep MN=ByteCount | grep -F 'RK=Node:openflow:1,Table:0,Flow:${flow}'
95 Append To List ${tsdr_op1_bc} ${ret_val1}
97 FOR ${flow} IN @{openflow_2}
98 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client
99 ... grep NID=openflow:2 | grep DC=FLOWSTATS | grep MN=ByteCount | grep -F 'RK=Node:openflow:2,Table:0,Flow:${flow}'
100 Append To List ${tsdr_op2_bc} ${ret_val1}
102 FOR ${flow} IN @{openflow_3}
103 ${ret_val1}= Verify the Metrics Attributes on Cassandra Client
104 ... grep NID=openflow:3 | grep DC=FLOWSTATS | grep MN=ByteCount | grep -F 'RK=Node:openflow:3,Table:0,Flow:${flow}'
105 Append To List ${tsdr_op3_bc} ${ret_val1}
107 Set Suite Variable @{tsdr_op1_pc}
108 Set Suite Variable @{tsdr_op2_pc}
109 Set Suite Variable @{tsdr_op3_pc}
110 Set Suite Variable @{tsdr_op1_bc}
111 Set Suite Variable @{tsdr_op2_bc}
112 Set Suite Variable @{tsdr_op3_bc}
114 Comparing Packet Count Metrics
115 [Documentation] Comparing Packet count values between Cassandra and openflow plugin
116 FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_1_packetcount} ${tsdr_op1_pc}
117 Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
119 FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_2_packetcount} ${tsdr_op2_pc}
120 Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
122 FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_3_packetcount} ${tsdr_op3_pc}
123 Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
126 Comparing Byte Count Metrics
127 [Documentation] Comparing byte count values between Cassandra and openflow plugin
128 FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_1_bytecount} ${tsdr_op1_bc}
129 Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
131 FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_2_bytecount} ${tsdr_op2_bc}
132 Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
134 FOR ${xml_val} ${tsdr_val} IN ZIP ${openflow_3_bytecount} ${tsdr_op3_bc}
135 Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
140 Initialize the Tsdr Suite
141 Initialize Cassandra Tables Metricval