Tidy updated test suites 91/33991/2
authorJozef Behran <jbehran@cisco.com>
Wed, 3 Feb 2016 14:58:16 +0000 (15:58 +0100)
committerJozef Behran <jbehran@cisco.com>
Thu, 4 Feb 2016 08:42:21 +0000 (09:42 +0100)
Change-Id: I21f45dcde5e23c18020ad55c065e2812c3de9816
Signed-off-by: Jozef Behran <jbehran@cisco.com>
csit/libraries/ClusterOvsdb.robot
csit/libraries/TsdrUtils.robot
csit/suites/openflowplugin/Switch_Qualification/010_OpenFlow_Connection.robot
csit/suites/openflowplugin/Switch_Qualification/020_OpenFlow_Actions.robot
csit/suites/ovsdb/Ovsdb_Net-virt/010_Ovsdb_Net_virt_flow.robot
csit/suites/ovsdb/Ovsdb_Net-virt/020_Ovsdb_Southbound_Net-Virt.robot
csit/suites/ovsdb/Southbound_Domain/Bug_Validation.robot
csit/suites/tsdr/Cassandra/010_InterfaceMetrics.robot
csit/suites/tsdr/Cassandra/020_FlowMetrics.robot
csit/suites/tsdr/Cassandra/030_FlowTableMetrics.robot
csit/suites/tsdr/Cassandra/040_QueueMetrics.robot

index c97d311339895302d4b4e4529263b6105e528e3c..cce3ff2bcbd749f0848f5fc030541e48fe259aec 100644 (file)
@@ -83,7 +83,8 @@ Create Bridge And Verify
     Log    ${body}
     ${TOOLS_SYSTEM_IP1}    Replace String    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_IP}    "${TOOLS_SYSTEM_IP}"
     ${dictionary}=    Create Dictionary    ${TOOLS_SYSTEM_IP1}=1    ${OVSDBPORT}=4    ${BRIDGE}=1
-    Wait Until Keyword Succeeds    20s    1s    Put And Check At URI In Cluster    ${controller_index_list}    ${controller_index}    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}%2Fbridge%2F${BRIDGE}    ${body}
+    Wait Until Keyword Succeeds    20s    1s    Put And Check At URI In Cluster    ${controller_index_list}    ${controller_index}    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}%2Fbridge%2F${BRIDGE}
+    ...    ${body}
     Wait Until Keyword Succeeds    5s    1s    Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary}    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}
 
 Create Bridge Manually And Verify
@@ -125,7 +126,7 @@ Create Port Via Controller
     Wait Until Keyword Succeeds    5s    1s    Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${port_dictionary}    ${OPERATIONAL_TOPO_API}
 
 Modify the destination IP of Port
-    [Arguments]    ${controller_index_list}    ${controller_index}     ${status}=${NONE}
+    [Arguments]    ${controller_index_list}    ${controller_index}    ${status}=${NONE}
     [Documentation]    This will modify the dst ip of existing port
     ${sample}    OperatingSystem.Get File    ${OVSDB_CONFIG_DIR}/create_port_3node.json
     ${body}    Replace String    ${sample}    192.168.1.10    10.0.0.19
index 80acb36574c45f123608691d89d874df11fed27d..cb08c4528d10b1f9999b94b69a2018acd9e6cfb9 100644 (file)
@@ -63,7 +63,6 @@ Iperf All Hosts
     Write    iperf ${host1} ${host2}
     Read Until    mininet>
 
-
 Iperf All Hosts Hbase
     [Arguments]    ${pattern}
     [Documentation]    Iperf between h1 and h2 and check Hbase
@@ -82,7 +81,7 @@ Iperf All Hosts HSQLDB
     [Arguments]    ${pattern}
     [Documentation]    Iperf between h1 and h2 and check Cassandra
     Iperf All Hosts    h1    h2
-    ${query_output}=   Issue Command On Karaf Console    tsdr:list NETFLOW | wc -l
+    ${query_output}=    Issue Command On Karaf Console    tsdr:list NETFLOW | wc -l
     Should Match Regexp    ${query_output}    ${pattern}
 
 Stop Tsdr Suite
@@ -264,7 +263,6 @@ Verify the Metrics Attributes on Cassandra Client
     ${metric_count}=    Get From List    ${split_line}    3
     [Return]    ${metric_count}
 
-
 Form Portstats Query Pattern
     [Arguments]    ${metric}    ${node}    ${port}    ${attribute}
     [Documentation]    Used for geneating openflow metrics Queries for Cassandra.
@@ -285,7 +283,6 @@ Create Temporary Key Info
     ${output}=    Run Command On Remote System    ${ODL_SYSTEM_IP}    cat ${CASSANDRA_DB_PATH}${val_table}|grep "${pattern}"
     [Return]    ${output}
 
-
 Verify Metric Val File
     [Documentation]    Returns Value for metric matching particular keya,keyb
     @{metricval}=    Read File and Return Split Lines    ${CASSANDRA_DB_PATH}${temp_metric_val}
@@ -303,7 +300,6 @@ Verify Metric log File
     [Return]    ${contents}
 
 Grep From File
-
     [Arguments]    ${file}    ${pattern}
     [Documentation]    Use cat to grep from the file and return the output
     ${output}=    Run Command On Remote System    ${ODL_SYSTEM_IP}    cat ${file} | ${pattern}
index 28e59d9095a0b072f4a7759318eab95fba35d578..a2682f9d9ff4e11bae75d34c84c9be4fccd18bb7 100644 (file)
@@ -16,7 +16,7 @@ Variables         ../../../variables/Variables.py
 ${SWITCH_CLASS}    Ovs
 ${SWITCH_IP}      ${TOOLS_SYSTEM_IP}
 ${SWITCH_PROMPT}    ${DEFAULT_LINUX_PROMPT}
-${ODL_SYSTEM_IP}     null
+${ODL_SYSTEM_IP}    null
 ${REST_CONTEXT}    /restconf/operational/opendaylight-inventory:nodes
 
 *** Test Cases ***
index 8f7c5919b740fdb13af44e177a27cbc28e6219d7..cace646fac7e9d30caf6bf18241de514a94812be 100644 (file)
@@ -29,7 +29,7 @@ Library           ../../../libraries/SwitchClasses/${SWITCH_CLASS}.py
 ${SWITCH_CLASS}    Ovs
 ${SWITCH_IP}      ${TOOLS_SYSTEM_IP}
 ${SWITCH_PROMPT}    ${DEFAULT_LINUX_PROMPT}
-${ODL_SYSTEM_IP}     null
+${ODL_SYSTEM_IP}    null
 ${REST_CON}       /restconf/config/opendaylight-inventory:nodes
 ${ipv4_src}       11.3.0.0/16
 ${ipv4_dst}       99.0.0.0/8
index 00b69c62488ffa6c4957e6ee2d380dd0da758fd2..5175bf6b907a5bf5fa60caf69b4db251517a45a1 100644 (file)
@@ -29,11 +29,11 @@ Check Shards Status Before Fail
 
 Start Mininet Multiple Connections
     [Documentation]    Start mininet with connection to all cluster instances.
-    ${mininet_conn_id}    Add Multiple Managers to OVS  ${MININET}    ${original_cluster_list}
+    ${mininet_conn_id}    Add Multiple Managers to OVS    ${MININET}    ${original_cluster_list}
     Set Suite Variable    ${mininet_conn_id}
     Log    ${mininet_conn_id}
 
 Check netvirt is loaded
     [Documentation]    Check if the netvirt piece has been loaded into the karaf instance
     [Tags]    Check netvirt is loaded
-    Wait Until Keyword Succeeds    4s    4s    Check Item Occurrence At URI In Cluster    ${original_cluster_list}    ${netvirt}    ${OPERATIONAL_NODES_NETVIRT}
\ No newline at end of file
+    Wait Until Keyword Succeeds    4s    4s    Check Item Occurrence At URI In Cluster    ${original_cluster_list}    ${netvirt}    ${OPERATIONAL_NODES_NETVIRT}
index efedb2a4ef7f057d198f859b066c9cfb769e931e..b9a15ca431428d866731f2058749c53acef7d70e 100644 (file)
@@ -12,8 +12,8 @@ Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/OVSDB.robot
 
 *** Variables ***
-@{FLOW_TABLE_LIST}    actions=goto_table:20    actions=CONTROLLER:65535    actions=goto_table:30    actions=goto_table:40    actions=goto_table:50    actions=goto_table:60    actions=goto_table:70    actions=goto_table:80    actions=goto_table:90    actions=goto_table:100    actions=goto_table:110    actions=drop
-
+@{FLOW_TABLE_LIST}    actions=goto_table:20    actions=CONTROLLER:65535    actions=goto_table:30    actions=goto_table:40    actions=goto_table:50    actions=goto_table:60    actions=goto_table:70
+...               actions=goto_table:80    actions=goto_table:90    actions=goto_table:100    actions=goto_table:110    actions=drop
 
 *** Test Cases ***
 Create Original Cluster List
@@ -28,36 +28,35 @@ Check Shards Status Before Fail
 
 Start Mininet Multiple Connections
     [Documentation]    Start mininet with connection to all cluster instances.
-    ${mininet_conn_id}    Add Multiple Managers to OVS  ${TOOLS_SYSTEM_IP}    ${original_cluster_list}
+    ${mininet_conn_id}    Add Multiple Managers to OVS    ${TOOLS_SYSTEM_IP}    ${original_cluster_list}
     Set Suite Variable    ${mininet_conn_id}
     Log    ${mininet_conn_id}
 
 Get bridge setup
     [Documentation]    This request is verifying that the br-int bridge has been created
     [Tags]    OVSDB netvirt
-    ${output}   Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
+    ${output}    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
     Log    ${output}
     Should Contain    ${output}    Bridge br-int
 
 Get port setup
     [Documentation]    This will check the port br-int has been created
     [Tags]    OVSDB netvirt
-    ${output}   Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
+    ${output}    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
     Log    ${output}
     Should Contain    ${output}    Port br-int
 
 Get interface setup
     [Documentation]    This verify the interface br-int has been created
     [Tags]    OVSDB netvirt
-    ${output}   Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
+    ${output}    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
     Log    ${output}
     Should Contain    ${output}    Interface br-int
 
-
 Get the bridge flows
     [Documentation]    This request fetch the OF13 flow tables to verify the flows are correctly added
     [Tags]    OVSDB netvirt
-    ${output}   Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-ofctl -O Openflow13 dump-flows br-int
+    ${output}    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-ofctl -O Openflow13 dump-flows br-int
     Log    ${output}
     : FOR    ${flows}    IN    @{FLOW_TABLE_LIST}
-    \    Should Contain    ${output}    ${flows}
\ No newline at end of file
+    \    Should Contain    ${output}    ${flows}
index b7c47be75b4e466084cb1705caf4cc3213393362..32a4cbaf2fc9ccc32a88a438b4f3bfd7da4042da 100644 (file)
@@ -127,4 +127,3 @@ Connect Controller To OVSDB Node
     Log    ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    200
     Wait Until Keyword Succeeds    3s    1s    Verify OVS Reports Connected
-
index 3ec12d8cd3b41db97411198384ddeb8b07ae5d40..824cc913e93e84c343ac4e8318f378637b00dcae 100644 (file)
@@ -13,14 +13,14 @@ Variables         ../../../variables/Variables.py
 *** Variables ***
 @{INTERFACE_METRICS}    TransmittedPackets    TransmittedBytes    TransmitErrors    TransmitDrops    ReceivedPackets    ReceivedBytes    ReceiveOverRunError
 ...               ReceiveFrameError    ReceiveErrors    ReceiveDrops    ReceiveCrcError    CollisionCount
-${root_path}    flow-capable-node-connector-statistics
-@{xpath}    ${root_path}/packets/transmitted    ${root_path}/bytes/transmitted    ${root_path}/transmit-errors    ${root_path}/transmit-drops    ${root_path}/packets/received    ${root_path}/bytes/received    ${root_path}/receive-over-run-error
-...                ${root_path}/receive-frame-error    ${root_path}/receive-errors    ${root_path}/receive-drops    ${root_path}/receive-crc-error    ${root_path}/collision-count
+${root_path}      flow-capable-node-connector-statistics
+@{xpath}          ${root_path}/packets/transmitted    ${root_path}/bytes/transmitted    ${root_path}/transmit-errors    ${root_path}/transmit-drops    ${root_path}/packets/received    ${root_path}/bytes/received    ${root_path}/receive-over-run-error
+...               ${root_path}/receive-frame-error    ${root_path}/receive-errors    ${root_path}/receive-drops    ${root_path}/receive-crc-error    ${root_path}/collision-count
 @{CATEGORY}       FlowStats    FlowTableStats    PortStats    QueueStats
 ${TSDR_PORTSTATS}    tsdr:list PortStats
 ${CONFIG_INTERVAL}    /restconf/config/tsdr-openflow-statistics-collector:TSDRDCConfig
 ${OPER_INTERVAL}    /restconf/operations/tsdr-openflow-statistics-collector:setPollingInterval
-${metric_path}     metric_path
+${metric_path}    metric_path
 ${metric_val}     metric_val
 @{xml_list}
 @{tsdr_list}
@@ -35,10 +35,9 @@ Verification of TSDR Cassandra Feature Installation
     Start Tsdr Suite
     Ping All Hosts
     Wait Until Keyword Succeeds    5x    30 sec    Check Metric path    24\\d+|25\\d+
-    Wait Until Keyword Succeeds    5x    30 sec    Check Metric val     \\d{5}
+    Wait Until Keyword Succeeds    5x    30 sec    Check Metric val    \\d{5}
 
 Storing Statistics from Openflow REST
-
     [Documentation]    Store openflow PortStats metrics using REST.
     : FOR    ${item}    IN    @{xpath}
     \    ${ret_val}=    Set Variable    -1
@@ -74,13 +73,11 @@ Storing Statistics from Openflow REST
     \    ${ret_val}=    Set Variable    -1
     Log List    ${xml_list}
 
-
-
 Verification of InterfaceMetrics-Attributes on Cassandra Client
     [Documentation]    Verify the InterfaceMetrics has been updated on Cassandra Data Store
     Copy TSDR tables
     : FOR    ${list}    IN    @{INTERFACE_METRICS}
-    \    ${ret_val1}=    Extract From DB Table     grep NID=openflow:1 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:1,NodeConnector:openflow:1:1
+    \    ${ret_val1}=    Extract From DB Table    grep NID=openflow:1 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:1,NodeConnector:openflow:1:1
     \    Append To List    ${tsdr_list}    ${ret_val1}
     \    ${ret_val1}=    Extract From DB Table    grep NID=openflow:1 | grep DC=PORTSTATS | grep MN=${list} | grep RK=Node:openflow:1,NodeConnector:openflow:1:2
     \    Append To List    ${tsdr_list}    ${ret_val1}
@@ -102,13 +99,10 @@ Verification of InterfaceMetrics-Attributes on Cassandra Client
     \    Append To List    ${tsdr_list}    ${ret_val1}
 
 Comparing Mertics
-
     [Documentation]    Compare openflow Interface metrics between data collected from openflow Plugin and TSDR
     : FOR    ${xml_val}    ${tsdr_val}    IN ZIP    ${xml_list}    ${tsdr_list}
     \    Compare Tsdr XML Metrics    ${xml_val}    ${tsdr_val}
 
-
-
 Verify Configuration Interval-change
     [Documentation]    Verify the TSDR Collection configuration changes
     ${session}=    Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
@@ -120,7 +114,6 @@ Verify Configuration Interval-change
     Delete All Sessions
 
 *** Keywords ***
-
 Verify TSDR Configuration Interval
     [Arguments]    ${interval}
     [Documentation]    Verify Configuration interval of TSDR Collection
@@ -144,6 +137,3 @@ Extract From DB Table
     ${ret_val1}=    Set Variable    -100
     ${ret_val1}=    Verify the Metrics Attributes on Cassandra Client    ${pattern}
     [Return]    ${ret_val1}
-
-
-
index b611bac127d2ac77e35684942f59fc3a74f1bd80..0cdf5934c180ad82fc2ea93f43a5d9f217ae04cf 100644 (file)
@@ -11,11 +11,10 @@ Resource          ../../../libraries/TsdrUtils.robot
 Variables         ../../../variables/Variables.py
 
 *** Variables ***
-
 @{FLOW_METRICS}    PacketCount    ByteCount
 ${TSDR_FLOWSTATS}    tsdr:list FlowStats
 ${packet_count}    flow/flow-statistics/packet-count
-${byte_count}    flow/flow-statistics/byte-count
+${byte_count}     flow/flow-statistics/byte-count
 @{tsdr_op1}
 @{tsdr_op2}
 @{tsdr_op3}
@@ -26,9 +25,7 @@ ${byte_count}    flow/flow-statistics/byte-count
 @{tsdr_op2_bc}
 @{tsdr_op3_bc}
 
-
 *** Test Cases ***
-
 Verification of TSDR Cassandra Feature Installation
     [Documentation]    Install and Verify the TSDR Cassandra Features
     Verify Feature Is Installed    odl-tsdr-cassandra
@@ -36,33 +33,25 @@ Verification of TSDR Cassandra Feature Installation
     Start Tsdr Suite
     Ping All Hosts
     Wait Until Keyword Succeeds    5x    30 sec    Check Metric path    24\\d+|25\\d+
-    Wait Until Keyword Succeeds    5x    30 sec    Check Metric val     \\d{5}
-
+    Wait Until Keyword Succeeds    5x    30 sec    Check Metric val    \\d{5}
 
 Getting all Tables from Openflow Plugin
     [Documentation]    Getting Flowstats from openflow plugin
-
     @{openflow_1}=    Return all XML matches    ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/    flow/id
     @{openflow_2}=    Return all XML matches    ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/    flow/id
     @{openflow_3}=    Return all XML matches    ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/    flow/id
-
-    Set Suite Variable           @{openflow_1}
+    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}
-
     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}
-
     Set Suite Variable    @{openflow_1_bytecount}
     Set Suite Variable    @{openflow_2_bytecount}
     Set Suite Variable    @{openflow_3_bytecount}
@@ -71,29 +60,23 @@ Verification of FlowStats-Attributes on Cassandra Data Store
     [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}'
-    \   Append To List    ${tsdr_op1_pc}    ${ret_val1}
-
+    \    ${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}
     : 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}'
-    \   Append To List    ${tsdr_op2_pc}    ${ret_val1}
-
+    \    ${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}
     : 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}'
-    \   Append To List    ${tsdr_op3_pc}    ${ret_val1}
-
+    \    ${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}
     : 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}'
-    \   Append To List    ${tsdr_op1_bc}    ${ret_val1}
-
+    \    ${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}
     : 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}'
-    \   Append To List    ${tsdr_op2_bc}    ${ret_val1}
-
+    \    ${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}
     : 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}'
-    \   Append To List    ${tsdr_op3_bc}    ${ret_val1}
-
+    \    ${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}
     Set Suite Variable    @{tsdr_op1_pc}
     Set Suite Variable    @{tsdr_op2_pc}
     Set Suite Variable    @{tsdr_op3_pc}
@@ -101,37 +84,24 @@ Verification of FlowStats-Attributes on Cassandra Data Store
     Set Suite Variable    @{tsdr_op2_bc}
     Set Suite Variable    @{tsdr_op3_bc}
 
-
 Comparing Packet Count Metrics
     [Documentation]    Comparing Packet count values between Cassandra and openflow plugin
-
     : FOR    ${xml_val}    ${tsdr_val}    IN ZIP    ${openflow_1_packetcount}    ${tsdr_op1_pc}
     \    Compare Tsdr XML Metrics    ${xml_val}    ${tsdr_val}    20
-
     : FOR    ${xml_val}    ${tsdr_val}    IN ZIP    ${openflow_2_packetcount}    ${tsdr_op2_pc}
     \    Compare Tsdr XML Metrics    ${xml_val}    ${tsdr_val}    20
-
     : FOR    ${xml_val}    ${tsdr_val}    IN ZIP    ${openflow_3_packetcount}    ${tsdr_op3_pc}
     \    Compare Tsdr XML Metrics    ${xml_val}    ${tsdr_val}    20
 
-
-
 Comparing Byte Count Metrics
     [Documentation]    Comparing byte count values between Cassandra and openflow plugin
-
     : FOR    ${xml_val}    ${tsdr_val}    IN ZIP    ${openflow_1_bytecount}    ${tsdr_op1_bc}
     \    Compare Tsdr XML Metrics    ${xml_val}    ${tsdr_val}    20
-
     : FOR    ${xml_val}    ${tsdr_val}    IN ZIP    ${openflow_2_bytecount}    ${tsdr_op2_bc}
     \    Compare Tsdr XML Metrics    ${xml_val}    ${tsdr_val}    20
-
     : FOR    ${xml_val}    ${tsdr_val}    IN ZIP    ${openflow_3_bytecount}    ${tsdr_op3_bc}
     \    Compare Tsdr XML Metrics    ${xml_val}    ${tsdr_val}    20
 
-
-
-
 *** Keywords ***
 Initialize the Tsdr Suite
     Initialize Cassandra Tables Metricval
-
index 7ae2492c44e2d51e1b5e2a5ac384a000e12bcd65..ec62e7f1a31485200e361eed29462e8baf9c9e77 100644 (file)
@@ -23,7 +23,6 @@ ${packetmatched}    flow-table-statistics/packets-matched
 @{openflow_packetmatched}
 
 *** Test Cases ***
-
 Verification of TSDR Cassandra Feature Installation
     [Documentation]    Install and Verify the TSDR Cassandra Features
     COMMENT    Install a Feature    odl-tsdr-cassandra-all    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    60
@@ -33,8 +32,7 @@ Verification of TSDR Cassandra Feature Installation
     Start Tsdr Suite
     Ping All Hosts
     Wait Until Keyword Succeeds    5x    30 sec    Check Metric path    24\\d+|25\\d+
-    Wait Until Keyword Succeeds    5x    30 sec    Check Metric val     \\d{5}
-
+    Wait Until Keyword Succeeds    5x    30 sec    Check Metric val    \\d{5}
 
 Getting all Tables from Openflow Plugin
     [Documentation]    Getting Flow Table Stats Values from Openflow plugin
@@ -44,77 +42,54 @@ Getting all Tables from Openflow Plugin
     Append To List    ${openflow_packetlookup}    ${ret}
     ${ret}=    Get Stats XML    ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/    ${packetlookup}
     Append To List    ${openflow_packetlookup}    ${ret}
-
     Set Suite Variable    @{openflow_packetlookup}
-
-
     ${ret}=    Get Stats XML    ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/    ${activeflows}
     Append To List    ${openflow_activeflows}    ${ret}
     ${ret}=    Get Stats XML    ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/    ${activeflows}
     Append To List    ${openflow_activeflows}    ${ret}
     ${ret}=    Get Stats XML    ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/    ${activeflows}
     Append To List    ${openflow_activeflows}    ${ret}
-
     Set Suite Variable    @{openflow_activeflows}
-
     ${ret}=    Get Stats XML    ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/    ${packetmatched}
     Append To List    ${openflow_packetmatched}    ${ret}
     ${ret}=    Get Stats XML    ${OPERATIONAL_NODES_API}/node/openflow:2/table/0/    ${packetmatched}
     Append To List    ${openflow_packetmatched}    ${ret}
     ${ret}=    Get Stats XML    ${OPERATIONAL_NODES_API}/node/openflow:3/table/0/    ${packetmatched}
     Append To List    ${openflow_packetmatched}    ${ret}
-
     Set Suite Variable    @{openflow_packetmatched}
 
-
-
-
 Verification of FlowStats-Attributes on Cassandra Data Store
     [Documentation]    Verify the InterfaceMetrics has been updated on Cassandra Data Store
     Copy TSDR tables
-    ${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
+    ${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
     Append To List    ${tsdr_pl}    ${ret_val1}
-    ${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
+    ${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
     Append To List    ${tsdr_pl}    ${ret_val1}
-    ${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
+    ${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
     Append To List    ${tsdr_pl}    ${ret_val1}
-
-
-
-    ${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
+    ${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
     Append To List    ${tsdr_af}    ${ret_val1}
-    ${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
+    ${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
     Append To List    ${tsdr_af}    ${ret_val1}
-    ${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
+    ${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
     Append To List    ${tsdr_af}    ${ret_val1}
-
-
-    ${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
+    ${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
     Append To List    ${tsdr_pm}    ${ret_val1}
-    ${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
+    ${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
     Append To List    ${tsdr_pm}    ${ret_val1}
-    ${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
+    ${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
     Append To List    ${tsdr_pm}    ${ret_val1}
 
-
-
-
 Comparing Flow Table Metrics
     [Documentation]    Comparing Flow table values between Cassandra and openflow plugin.
-
     : FOR    ${xml_val}    ${tsdr_val}    IN ZIP    ${openflow_packetlookup}    ${tsdr_pl}
     \    Compare Tsdr XML Metrics    ${xml_val}    ${tsdr_val}    5
-
     : FOR    ${xml_val}    ${tsdr_val}    IN ZIP    ${openflow_activeflows}    ${tsdr_af}
     \    Compare Tsdr XML Metrics    ${xml_val}    ${tsdr_val}    5
-
     : FOR    ${xml_val}    ${tsdr_val}    IN ZIP    ${openflow_packetmatched}    ${tsdr_pm}
     \    Compare Tsdr XML Metrics    ${xml_val}    ${tsdr_val}    5
 
-
-
 *** Keywords ***
 Initialize the Tsdr Suite
     COMMENT    Initialize the Cassandra for TSDR
     Initialize Cassandra Tables Metricval
-
index 691bf2f88ee7f3619c39c4dfeb3f0e5c2fb1ec32..8b1ed17aa69cf491ee6cf204b950208d126c8ab8 100644 (file)
@@ -1,6 +1,6 @@
 *** Settings ***
 Documentation     Test suite for Cassandra DataStore Queue Stats Verification
-Suite Setup           Initialize Cassandra Tables Metricval
+Suite Setup       Initialize Cassandra Tables Metricval
 Suite Teardown    Stop Tsdr Suite
 Library           SSHLibrary
 Library           Collections
@@ -13,7 +13,7 @@ Variables         ../../../variables/Variables.py
 *** Variables ***
 @{QUEUE_METRICS}    TransmittedPackets    TransmittedBytes    TransmissionErrors
 ${TSDR_QUEUESTATS}    tsdr:list QueueStats
-${QUERY_HEAD}    ${OPERATIONAL_NODES_API}/node
+${QUERY_HEAD}     ${OPERATIONAL_NODES_API}/node
 ${query_head1}    ${QUERY_HEAD}/openflow:2/node-connector/openflow:2:2/queue/
 @{tsdr_q0}
 @{tsdr_q2}
@@ -26,7 +26,6 @@ ${transmittederrors}    flow-capable-node-connector-queue-statistics/transmissio
 @{openflow_q1}
 
 *** Test Cases ***
-
 Verification of TSDR Cassandra Feature Installation
     [Documentation]    Install and Verify the TSDR Cassandra Features
     COMMENT    Install a Feature    odl-tsdr-cassandra-all    ${CONTROLLER}    ${KARAF_SHELL_PORT}    60
@@ -37,40 +36,32 @@ Verification of TSDR Cassandra Feature Installation
     Configuration of Queue on Switch
     Ping All Hosts
     Wait Until Keyword Succeeds    5x    30 sec    Check Metric path    24\\d+|25\\d+|26\\d+|27\\d+
-    Wait Until Keyword Succeeds    5x    30 sec    Check Metric val     \\d{5}
+    Wait Until Keyword Succeeds    5x    30 sec    Check Metric val    \\d{5}
 
 Getting all Tables from Openflow Plugin
     [Documentation]    Getting Queue Stats from openflow plugin
-    ${ret}=    Get Stats XML    ${query_head1}0/   ${transmittederrors}
+    ${ret}=    Get Stats XML    ${query_head1}0/    ${transmittederrors}
     Append To List    ${openflow_q0}    ${ret}
     ${ret}=    Get Stats XML    ${query_head1}0/    ${transmittedpackets}
     Append To List    ${openflow_q0}    ${ret}
     ${ret}=    Get Stats XML    ${query_head1}0/    ${transmittedbytes}
     Append To List    ${openflow_q0}    ${ret}
-
     Set Suite Variable    @{openflow_q0}
-
-
-    ${ret}=    Get Stats XML    ${query_head1}1/   ${transmittederrors}
+    ${ret}=    Get Stats XML    ${query_head1}1/    ${transmittederrors}
     Append To List    ${openflow_q1}    ${ret}
     ${ret}=    Get Stats XML    ${query_head1}1/    ${transmittedpackets}
     Append To List    ${openflow_q1}    ${ret}
     ${ret}=    Get Stats XML    ${query_head1}1/    ${transmittedbytes}
     Append To List    ${openflow_q1}    ${ret}
-
     Set Suite Variable    @{openflow_q1}
-
-
-    ${ret}=    Get Stats XML    ${query_head1}2/   ${transmittederrors}
+    ${ret}=    Get Stats XML    ${query_head1}2/    ${transmittederrors}
     Append To List    ${openflow_q2}    ${ret}
     ${ret}=    Get Stats XML    ${query_head1}2/    ${transmittedpackets}
     Append To List    ${openflow_q2}    ${ret}
     ${ret}=    Get Stats XML    ${query_head1}2/    ${transmittedbytes}
     Append To List    ${openflow_q2}    ${ret}
-
     Set Suite Variable    @{openflow_q2}
 
-
 Verification of FlowStats-Attributes on Cassandra Data Store
     [Documentation]    Verify the InterfaceMetrics has been updated on Cassandra Data Store
     Copy TSDR tables
@@ -80,18 +71,11 @@ Verification of FlowStats-Attributes on Cassandra Data Store
     Append To List    ${tsdr_q0}    ${ret_val1}
     ${ret_val1}=    Verify the Metrics Attributes on Cassandra Client    grep NID=openflow:2 | grep DC=QUEUESTATS | grep MN=TransmittedBytes | grep RK=Node:openflow:2,NodeConnector:openflow:2:2,Queue:0
     Append To List    ${tsdr_q0}    ${ret_val1}
-
-
-
     ${ret_val1}=    Verify the Metrics Attributes on Cassandra Client    grep NID=openflow:2 | grep DC=QUEUESTATS | grep MN=TransmissionErrors | grep RK=Node:openflow:2,NodeConnector:openflow:2:2,Queue:1
     Append To List    ${tsdr_q1}    ${ret_val1}
     ${ret_val1}=    Verify the Metrics Attributes on Cassandra Client    grep NID=openflow:2 | grep DC=QUEUESTATS | grep MN=TransmittedPackets | grep RK=Node:openflow:2,NodeConnector:openflow:2:2,Queue:1
     Append To List    ${tsdr_q1}    ${ret_val1}
     ${ret_val1}=    Verify the Metrics Attributes on Cassandra Client    grep NID=openflow:2 | grep DC=QUEUESTATS | grep MN=TransmittedBytes | grep RK=Node:openflow:2,NodeConnector:openflow:2:2,Queue:1
-
-
-
-
     ${ret_val1}=    Verify the Metrics Attributes on Cassandra Client    grep NID=openflow:2 | grep DC=QUEUESTATS | grep MN=TransmissionErrors | grep RK=Node:openflow:2,NodeConnector:openflow:2:2,Queue:2
     Append To List    ${tsdr_q2}    ${ret_val1}
     ${ret_val1}=    Verify the Metrics Attributes on Cassandra Client    grep NID=openflow:2 | grep DC=QUEUESTATS | grep MN=TransmittedPackets | grep RK=Node:openflow:2,NodeConnector:openflow:2:2,Queue:2
@@ -99,21 +83,15 @@ Verification of FlowStats-Attributes on Cassandra Data Store
     ${ret_val1}=    Verify the Metrics Attributes on Cassandra Client    grep NID=openflow:2 | grep DC=QUEUESTATS | grep MN=TransmittedBytes | grep RK=Node:openflow:2,NodeConnector:openflow:2:2,Queue:2
     Append To List    ${tsdr_q2}    ${ret_val1}
 
-
 Comparing Queue Metrics
     [Documentation]    Comparing Queue metrics between Cassandra and OF plugin
-
     : FOR    ${xml_val}    ${tsdr_val}    IN ZIP    ${openflow_q0}    ${tsdr_q0}
     \    Compare Tsdr XML Metrics    ${xml_val}    ${tsdr_val}    20
-
     : FOR    ${xml_val}    ${tsdr_val}    IN ZIP    ${openflow_q1}    ${tsdr_q1}
     \    Compare Tsdr XML Metrics    ${xml_val}    ${tsdr_val}    20
-
     : FOR    ${xml_val}    ${tsdr_val}    IN ZIP    ${openflow_q2}    ${tsdr_q2}
     \    Compare Tsdr XML Metrics    ${xml_val}    ${tsdr_val}    20
 
-
-
 *** Keyword ***
 Configuration of Queue on Switch
     [Documentation]    Queue configuration on openvswitch