*** Settings ***
-Documentation Test suite for Cassandra DataStore Flow Stats Verification
-Suite Setup Initialize the Tsdr Suite
-Suite Teardown Stop Tsdr Suite
-Library SSHLibrary
-Library Collections
-Library String
-Library ../../../libraries/Common.py
-Resource ../../../libraries/KarafKeywords.robot
-Resource ../../../libraries/TsdrUtils.robot
-Variables ../../../variables/Variables.py
+Documentation Test suite for Cassandra DataStore Flow Stats Verification
+
+Library SSHLibrary
+Library Collections
+Library String
+Library ../../../libraries/Common.py
+Resource ../../../libraries/KarafKeywords.robot
+Resource ../../../libraries/TsdrUtils.robot
+Variables ../../../variables/Variables.py
+
+Suite Setup Initialize the Tsdr Suite
+Suite Teardown Stop Tsdr Suite
+
*** Variables ***
-@{FLOW_METRICS} PacketCount ByteCount
-${TSDR_FLOWSTATS} tsdr:list FlowStats
-${packet_count} flow/flow-statistics/packet-count
-${byte_count} flow/flow-statistics/byte-count
+@{FLOW_METRICS} PacketCount ByteCount
+${TSDR_FLOWSTATS} tsdr:list FlowStats
+${packet_count} flow/flow-statistics/packet-count
+${byte_count} flow/flow-statistics/byte-count
@{tsdr_op1}
@{tsdr_op2}
@{tsdr_op3}
@{tsdr_op2_bc}
@{tsdr_op3_bc}
+
*** Test Cases ***
Verification of TSDR Cassandra Feature Installation
[Documentation] Install and Verify the TSDR Cassandra Features
Set Suite Variable @{openflow_1}
Set Suite Variable @{openflow_2}
Set Suite Variable @{openflow_3}
- @{openflow_1_packetcount}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/ ${packet_count}
- @{openflow_2_packetcount}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/ ${packet_count}
- @{openflow_3_packetcount}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/ ${packet_count}
+ @{openflow_1_packetcount}= Return all XML matches
+ ... ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/
+ ... ${packet_count}
+ @{openflow_2_packetcount}= Return all XML matches
+ ... ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/
+ ... ${packet_count}
+ @{openflow_3_packetcount}= Return all XML matches
+ ... ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/
+ ... ${packet_count}
Set Suite Variable @{openflow_1_packetcount}
Set Suite Variable @{openflow_2_packetcount}
Set Suite Variable @{openflow_3_packetcount}
- @{openflow_1_bytecount}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/ ${byte_count}
- @{openflow_2_bytecount}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/ ${byte_count}
- @{openflow_3_bytecount}= Return all XML matches ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/ ${byte_count}
+ @{openflow_1_bytecount}= Return all XML matches
+ ... ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/
+ ... ${byte_count}
+ @{openflow_2_bytecount}= Return all XML matches
+ ... ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/
+ ... ${byte_count}
+ @{openflow_3_bytecount}= Return all XML matches
+ ... ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/
+ ... ${byte_count}
Set Suite Variable @{openflow_1_bytecount}
Set Suite Variable @{openflow_2_bytecount}
Set Suite Variable @{openflow_3_bytecount}
[Documentation] Verify the InterfaceMetrics has been updated on Cassandra Data Store
Copy TSDR tables
FOR ${flow} IN @{openflow_1}
- ${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}'
+ ${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}'
Append To List ${tsdr_op1_pc} ${ret_val1}
END
FOR ${flow} IN @{openflow_2}
- ${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}'
+ ${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}'
Append To List ${tsdr_op2_pc} ${ret_val1}
END
FOR ${flow} IN @{openflow_3}
- ${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}'
+ ${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}'
Append To List ${tsdr_op3_pc} ${ret_val1}
END
FOR ${flow} IN @{openflow_1}
- ${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}'
+ ${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}'
Append To List ${tsdr_op1_bc} ${ret_val1}
END
FOR ${flow} IN @{openflow_2}
- ${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}'
+ ${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}'
Append To List ${tsdr_op2_bc} ${ret_val1}
END
FOR ${flow} IN @{openflow_3}
- ${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}'
+ ${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}'
Append To List ${tsdr_op3_bc} ${ret_val1}
END
Set Suite Variable @{tsdr_op1_pc}
Compare Tsdr XML Metrics ${xml_val} ${tsdr_val} 20
END
+
*** Keywords ***
Initialize the Tsdr Suite
Initialize Cassandra Tables Metricval