Added new testcases for FlowMeter,FlowGroupMetrics on both H2 and 86/20886/18
authorvasanthan_balasubram <vasanthan_balasubram@dell.com>
Thu, 21 May 2015 11:51:21 +0000 (17:21 +0530)
committerJamo Luhrsen <james.luhrsen@hp.com>
Wed, 27 May 2015 04:09:52 +0000 (04:09 +0000)
HBase DataStore.
Modified TsdrUtils.txt to taken care of hbase server and stop

Change-Id: I65df5c8f7dcd2d0123a32cbb6f0563c3ca43304d
Signed-off-by: vasanthan_balasubram <vasanthan_balasubram@dell.com>
test/csit/libraries/TsdrUtils.txt
test/csit/suites/tsdr/H2/030_FlowTableMetrics.robot
test/csit/suites/tsdr/H2/040_QueueMetrics.robot
test/csit/suites/tsdr/H2/050_GroupMetrics.robot [new file with mode: 0644]
test/csit/suites/tsdr/H2/060_FlowMeterMetrics.robot [new file with mode: 0644]
test/csit/suites/tsdr/HBase/010_InterfaceMetrics.robot
test/csit/suites/tsdr/HBase/040_QueueMetrics.robot
test/csit/suites/tsdr/HBase/050_GroupMetrics.robot [new file with mode: 0644]
test/csit/suites/tsdr/HBase/060_FlowMeterMetrics.robot [new file with mode: 0644]
test/csit/suites/tsdr/HBase/start-hbase-client.sh [deleted file]
test/csit/suites/tsdr/HBase/stop-hbase-client.sh [deleted file]

index 3a6eed107c4db0c21ee267d4062ec0ccb29979b0..ce8f07aa3dd05d9d5358464c856b15abd3720782 100644 (file)
@@ -3,12 +3,12 @@ Library           OperatingSystem
 Resource          Utils.txt\r
 \r
 *** Variables ***\r
-${start}          sudo mn --controller=remote,ip=${CONTROLLER} --topo=linear,3 --switch ovsk,protocols=OpenFlow13\r
-${START_HBASE_CLIENT}    /tmp/Hbase/hbase-0.94.15/bin/hbase shell\r
+${HBASE_CLIENT}    /tmp/Hbase/hbase-0.94.15/bin\r
 ${final}          ${EMPTY}\r
 \r
 *** Keywords ***\r
 Start Tsdr Suite\r
+    [Arguments]    ${switch}=ovsk\r
     [Documentation]    TSDR specific setup/cleanup work that can be done safely before any system\r
     ...    is run.\r
     Clean Mininet System\r
@@ -16,6 +16,8 @@ Start Tsdr Suite
     Set Suite Variable    ${mininet_conn_id1}\r
     Login With Public Key    ${MININET_USER}    ${USER_HOME}/.ssh/id_rsa    any\r
     Execute Command    sudo ovs-vsctl set-manager ptcp:6644\r
+    ${start}=    Set Variable    sudo mn --controller=remote,ip=${CONTROLLER} --topo=linear,3 --switch ${switch},protocols=OpenFlow13\r
+    Log    ${start}\r
     Write    ${start}\r
     Read Until    mininet>\r
 \r
@@ -30,35 +32,22 @@ Stop Tsdr Suite
 \r
 Initialize the HBase for TSDR\r
     [Documentation]    Install and initialize the tsdr tables on HBase Server\r
-    ${conn_id}=    Open Connection    ${CONTROLLER}    timeout=120s\r
-    Login With Public Key    ${MININET_USER}    ${USER_HOME}/.ssh/id_rsa    any\r
-    Put File    ${USER_HOME}/workspace/tsdr-csit-verify-hbase-datastore-master/test/csit/suites/tsdr/HBase/start-hbase-client.sh\r
-    ${hbase_server}=    Execute Command    ./start-hbase-client.sh\r
+    ${hbase_server}=    Run Command On Remote System    ${CONTROLLER}    export JAVA_HOME=/usr && ${HBASE_CLIENT}/start-hbase.sh    ${MININET_USER}    ${LINUX_PROMPT}    120\r
     Log    ${hbase_server}\r
-    ${hbase_process}=    Execute Command      ps -ef | grep HMaster\r
+    ${hbase_process}=    Run Command On Remote System    ${CONTROLLER}    ps -ef | grep HMaster\r
     Log    ${hbase_process}\r
-    Close Connection\r
 \r
 Stop the HBase Server\r
     [Documentation]    Stop the HBase server\r
-    ${conn_id}=    Open Connection    ${CONTROLLER}    timeout=120s\r
-    Login With Public Key    ${MININET_USER}    ${USER_HOME}/.ssh/id_rsa    any\r
-    Put File    ${USER_HOME}/workspace/tsdr-csit-verify-hbase-datastore-master/test/csit/suites/tsdr/HBase/stop-hbase-client.sh\r
-    ${hbase_server}=    Execute Command    ./stop-hbase-client.sh\r
+    ${hbase_server}=    Run Command On Remote System    ${CONTROLLER}    export JAVA_HOME=/usr && ${HBASE_CLIENT}/stop-hbase.sh    ${MININET_USER}    ${LINUX_PROMPT}    90\r
     Log    ${hbase_server}\r
-    Close Connection\r
 \r
 Configure the Queue on Switch\r
     [Arguments]    ${queue_interface}    ${user}=${MININET_USER}    ${prompt}=${LINUX_PROMPT}    ${prompt_timeout}=120s\r
     [Documentation]    Configure the 2 queues on specified openvswitch interface\r
     Log    Configure the queue on ${queue_interface}\r
-    Open Connection    ${MININET}    prompt=${LINUX_PROMPT}    timeout=30s\r
-    Login With Public Key    ${user}    ${USER_HOME}/.ssh/id_rsa    any\r
-    ${output}=    Execute Command    sudo ovs-vsctl set port s2-eth3 qos=@newqos -- --id=@newqos create qos type=linux-htb other-config:max-rate=200000000 queues=0=@q0,1=@q1,2=@q2 -- --id=@q0 create queue other-config:min-rate=100000 other-config:max-rate=200000 -- --id=@q1 create queue other-config:min-rate=10001 other-config:max-rate=300000 -- --id=@q2 create queue other-config:min-rate=300001 other-config:max-rate=200000000\r
+    ${output}=    Run Command On Remote System    ${MININET}    sudo ovs-vsctl set port ${queue_interface} qos=@newqos -- --id=@newqos create qos type=linux-htb other-config:max-rate=200000000 queues=0=@q0,1=@q1,2=@q2 -- --id=@q0 create queue other-config:min-rate=100000 other-config:max-rate=200000 -- --id=@q1 create queue other-config:min-rate=10001 other-config:max-rate=300000 -- --id=@q2 create queue other-config:min-rate=300001 other-config:max-rate=200000000    ${MININET_USER}    ${LINUX_PROMPT}    90\r
     Log    ${output}\r
-    Switch Connection    ${mininet_conn_id1}\r
-    Write    pingall\r
-    Read Until    mininet>\r
 \r
 Query the Data from HBaseClient\r
     [Arguments]    ${query}    ${remote}=${CONTROLLER}    ${user}=${MININET_USER}    ${prompt}=${LINUX_PROMPT}    ${prompt_timeout}=120s\r
@@ -67,7 +56,7 @@ Query the Data from HBaseClient
     ${conn_id}=    Open Connection    ${remote}    prompt=${prompt}    timeout=${prompt_timeout}\r
     Login With Public Key    ${user}    ${USER_HOME}/.ssh/id_rsa    any\r
     Write    export JAVA_HOME=/usr\r
-    Write    ${START_HBASE_CLIENT}\r
+    Write    ${HBASE_CLIENT}/hbase shell\r
     Read Until    hbase(main):001:0>\r
     Write    ${query}\r
     ${output}=    Read Until    hbase(main):\r
index 1f69c6ee2c6e2e1115c64542a028142c476e9f88..b392c9a19bd57e43a665c707c1cb88529e367d3d 100644 (file)
@@ -17,8 +17,8 @@ ${TSDR_FLOWTABLE_STATS}    tsdr:list FlowTableStats
 *** Test Cases ***\r
 Verification of TSDR FlowTableStats\r
     [Documentation]    Verify the TSDR FlowiTableStats\r
-    Wait Until Keyword Succeeds    60s    1s    Verify the Metric is Collected?    ${TSDR_FLOWTABLE_STATS}| grep "openflow"    FLOWTABLESTATS\r
-    ${output}=    Issue Command On Karaf Console    ${TSDR_FLOWSTATS}    ${CONTROLLER}    ${KARAF_SHELL_PORT}    30\r
+    Wait Until Keyword Succeeds    60s    1s    Verify the Metric is Collected?    ${TSDR_FLOWTABLE_STATS}| grep ActiveFlow    FLOWTABLESTATS\r
+    ${output}=    Issue Command On Karaf Console    ${TSDR_FLOWTABLE_STATS}| grep openflow:1 | head    ${CONTROLLER}    ${KARAF_SHELL_PORT}    180\r
     : FOR    ${list}    IN    @{FLOWTABLE_METRICS}\r
     \    Should Contain    ${output}    ${list}\r
 \r
index 4420d45930e662bd65dd293e5759c472cb1d6590..7faaf75451a67fe6f00f3eaa66e878b8852ced72 100644 (file)
@@ -33,26 +33,12 @@ Verify tsdr:purgeall command
     [Documentation]    Verify the tsdr:purgeall command\r
     Issue Command On Karaf Console    tsdr:purgeall    ${CONTROLLER}    ${KARAF_SHELL_PORT}\r
     : FOR    ${list}    IN    @{CMD_LIST}\r
-    \    ${out}=    Issue Command On Karaf Console    ${list}    ${CONTROLLER}    ${KARAF_SHELL_PORT}\r
+    \    ${out}=    Issue Command On Karaf Console    tsdr:list ${list}    ${CONTROLLER}    ${KARAF_SHELL_PORT}\r
     \    Should Contain    ${out}    no data of this category\r
     : FOR    ${list}    IN    @{QUEUE_METRICS}\r
     \    ${out}=    Query Metrics on H2 Datastore    QUEUESTATS    ${list}\r
     \    Should not Contain    ${out}    ${list}\r
 \r
-Uninstall all TSDR H2 Feature\r
-    [Documentation]    UnInstall all TSDR HBase Features\r
-    Uninstall a Feature    odl-tsdr-H2-persistence\r
-    Verify Feature Is Not Installed    odl-tsdr-H2-persistence\r
-    Uninstall a Feature    odl-tsdr-all\r
-    Verify Feature Is Not Installed    odl-tsdr-all\r
-    Uninstall a Feature    odl-tsdr-core\r
-    Verify Feature Is Not Installed    odl-tsdr-core\r
-\r
-Verification TSDR Command shouldnot exist in help\r
-    [Documentation]    Verify the TSDR List command on help\r
-    ${output}=    Issue Command On Karaf Console    tsdr\t    ${CONTROLLER}    ${KARAF_SHELL_PORT}\r
-    Should not Contain    ${output}    tsdr:list\r
-\r
 *** Keyword ***\r
 Configuration of Queue on Switch\r
     [Documentation]    Queue configuration on openvswitch\r
diff --git a/test/csit/suites/tsdr/H2/050_GroupMetrics.robot b/test/csit/suites/tsdr/H2/050_GroupMetrics.robot
new file mode 100644 (file)
index 0000000..d10cee1
--- /dev/null
@@ -0,0 +1,51 @@
+*** Settings ***\r
+Documentation     Test suite for H2 DataStore FlowGroup Stats Verification\r
+Suite Setup       Run Keywords    Start TSDR suite with CPqD Switch    Configuration of FlowGroup on Switch\r
+Suite Teardown    Stop Tsdr Suite\r
+Library           SSHLibrary\r
+Library           Collections\r
+Library           String\r
+Library           ../../../libraries/Common.py\r
+Resource          ../../../libraries/KarafKeywords.txt\r
+Resource          ../../../libraries/TsdrUtils.txt\r
+Variables         ../../../variables/Variables.py\r
+\r
+*** Variables ***\r
+@{FLOWGROUP_METRICS}    ByteCount    PacketCount    RefCount\r
+${TSDR_FLOWGROUPSTATS}    tsdr:list FlowGroupStats\r
+@{FLOWGROUP_HEADER}    MetricName    MetricValue    MetricCategory    MetricDetails\r
+\r
+*** Test Cases ***\r
+Verify the FlowGroup Stats attributes exist thru Karaf console\r
+    [Documentation]    Verify the FlowGroupStats attributes exist on Karaf Console\r
+    Wait Until Keyword Succeeds    120s    1s    Verify the Metric is Collected?    ${TSDR_FLOWGROUPSTATS}    ByteCount\r
+    ${output}=    Issue Command On Karaf Console    ${TSDR_FLOWGROUPSTATS}    ${CONTROLLER}    ${KARAF_SHELL_PORT}    30\r
+    : FOR    ${list}    IN    @{FLOWGROUP_METRICS}\r
+    \    Should Contain    ${output}    ${list}\r
+\r
+Verification of FlowGroupStats-ByteCount on Karaf Console\r
+    [Documentation]    Verify the FlowGroupStats has been updated thru tsdr:list command on karaf console\r
+    ${tsdr_cmd}=    Concatenate the String    ${TSDR_FLOWGROUPSTATS}    | grep ByteCount | head\r
+    ${output}=    Issue Command On Karaf Console    ${tsdr_cmd}    ${CONTROLLER}    ${KARAF_SHELL_PORT}    90\r
+    Should Contain    ${output}    ByteCount\r
+    Should Contain    ${output}    FLOWGROUPSTATS\r
+    Should not Contain    ${output}    null\r
+    : FOR    ${list}    IN    @{FLOWGROUP_HEADER}\r
+    \    Should Contain    ${output}    ${list}\r
+\r
+Verify FlowGroupStats-Attributes on H2 Datastore using JDBC Client\r
+    [Documentation]    Verify the GroupStats,attributes on H2 Datastore using JDBC Client\r
+    : FOR    ${list}    IN    @{FLOWGROUP_METRICS}\r
+    \    ${output}=    Query Metrics on H2 Datastore    FLOWGROUPSTATS    ${list}\r
+    \    Should Contain    ${output}    ${list}\r
+\r
+*** Keyword ***\r
+Start TSDR suite with CPqD Switch\r
+    Start Tsdr Suite    user\r
+\r
+Configuration of FlowGroup on Switch\r
+    [Documentation]    FlowGroup configuration on CPqD\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s1 group-mod cmd=add,group=1,type=all\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s1 flow-mod table=0,cmd=add eth_type=0x800,eth_src=00:01:02:03:04:05 apply:group=1\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s1 ping 10\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s2 ping 10\r
diff --git a/test/csit/suites/tsdr/H2/060_FlowMeterMetrics.robot b/test/csit/suites/tsdr/H2/060_FlowMeterMetrics.robot
new file mode 100644 (file)
index 0000000..b62a855
--- /dev/null
@@ -0,0 +1,63 @@
+*** Settings ***\r
+Documentation     Test suite for H2 DataStore FlowMeter Stats Verification\r
+Suite Setup       Run Keywords    Start TSDR suite with CPqD Switch    Configuration of FlowMeter on Switch\r
+Suite Teardown    Stop Tsdr Suite\r
+Library           SSHLibrary\r
+Library           Collections\r
+Library           String\r
+Library           ../../../libraries/Common.py\r
+Resource          ../../../libraries/KarafKeywords.txt\r
+Resource          ../../../libraries/TsdrUtils.txt\r
+Variables         ../../../variables/Variables.py\r
+\r
+*** Variables ***\r
+@{FLOWMETER_METRICS}    ByteInCount    PacketInCount    FlowCount\r
+${TSDR_FLOWMETERSTATS}    tsdr:list FlowMeterStats\r
+@{FLOWMETER_HEADER}    MetricName    MetricValue    MetricCategory    MetricDetails\r
+\r
+*** Test Cases ***\r
+Verify the FlowMeter Stats attributes exist thru Karaf console\r
+    [Documentation]    Verify the FlowMeterStats attributes exist on Karaf Console\r
+    Wait Until Keyword Succeeds    120s    1s    Verify the Metric is Collected?    ${TSDR_FLOWMETERSTATS}    ByteInCount\r
+    ${output}=    Issue Command On Karaf Console    ${TSDR_FLOWMETERSTATS}    ${CONTROLLER}    ${KARAF_SHELL_PORT}    30\r
+    : FOR    ${list}    IN    @{FLOWMETER_METRICS}\r
+    \    Should Contain    ${output}    ${list}\r
+\r
+Verification of FlowMeterStats-ByteInCount on Karaf Console\r
+    [Documentation]    Verify the FlowMeterStats has been updated thru tsdr:list command on karaf console\r
+    ${tsdr_cmd}=    Concatenate the String    ${TSDR_FLOWMETERSTATS}    | grep ByteInCount | head\r
+    ${output}=    Issue Command On Karaf Console    ${tsdr_cmd}    ${CONTROLLER}    ${KARAF_SHELL_PORT}    90\r
+    Should Contain    ${output}    ByteInCount\r
+    Should Contain    ${output}    FLOWMETERSTATS\r
+    Should not Contain    ${output}    null\r
+    : FOR    ${list}    IN    @{FLOWMETER_HEADER}\r
+    \    Should Contain    ${output}    ${list}\r
+\r
+Verify FlowMeterStats-Attributes on H2 Datastore using JDBC Client\r
+    [Documentation]    Verify the FlowMeterStats,attributes on H2 Datastore using JDBC Client\r
+    : FOR    ${list}    IN    @{FLOWMETER_METRICS}\r
+    \    ${output}=    Query Metrics on H2 Datastore    FLOWMETERSTATS    ${list}\r
+    \    Should Contain    ${output}    ${list}\r
+\r
+Uninstall all TSDR H2 Feature\r
+    [Documentation]    UnInstall all TSDR H2 Features\r
+    Uninstall a Feature    odl-tsdr-H2-persistence odl-tsdr-all odl-tsdr-core\r
+    Verify Feature Is Not Installed    odl-tsdr-H2-persistence\r
+    Verify Feature Is Not Installed    odl-tsdr-all\r
+    Verify Feature Is Not Installed    odl-tsdr-core\r
+\r
+Verification TSDR Command shouldnot exist in help\r
+    [Documentation]    Verify the TSDR List command on help\r
+    ${output}=    Issue Command On Karaf Console    tsdr\t    ${CONTROLLER}    ${KARAF_SHELL_PORT}\r
+    Should not Contain    ${output}    tsdr:list\r
+\r
+*** Keyword ***\r
+Start TSDR suite with CPqD Switch\r
+    Start Tsdr Suite    user\r
+\r
+Configuration of FlowMeter on Switch\r
+    [Documentation]    FlowMeter configuration on CPqD\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s1 meter-mod cmd=add,flags=1,meter=1 drop:rate=100\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s1 flow-mod table=0,cmd=add in_port=1 meter:1 apply:output=2\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s1 ping 10\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s2 ping 10\r
index 9b1b56c6b2e74a4a804b1e1f4bdf29de15d9adb6..349873df3a81b245c59f951970d62fac7d300724 100755 (executable)
@@ -1,10 +1,11 @@
 *** Settings ***\r
 Documentation     Test suite for Hbase DataStore PortStats Verification\r
-Suite Setup       Run Keywords    Start Tsdr Suite    Initialize the HBase for TSDR\r
+Suite Setup       Initialize the Tsdr Suite\r
 Suite Teardown    Stop Tsdr Suite\r
 Library           SSHLibrary\r
 Library           Collections\r
 Library           String\r
+Library           RequestsLibrary\r
 Library           ../../../libraries/Common.py\r
 Resource          ../../../libraries/KarafKeywords.txt\r
 Resource          ../../../libraries/TsdrUtils.txt\r
@@ -15,6 +16,8 @@ Variables         ../../../variables/Variables.py
 ...               ReceiveFrameError    ReceiveErrors    ReceiveDrops    ReceiveCrcError    CollisionCount\r
 @{CATEGORY}       FlowGroupStats    FlowMeterStats    FlowStats    FlowTableStats    PortStats    QueueStats\r
 ${TSDR_PORTSTATS}    tsdr:list PortStats\r
+${CONFIG_INTERVAL}    /restconf/config/TSDRDC:TSDRDCConfig\r
+${OPER_INTERVAL}    /restconf/operations/TSDRDC:setPollingInterval\r
 \r
 *** Test Cases ***\r
 Verification of TSDR HBase Feature Installation\r
@@ -31,7 +34,7 @@ Verification TSDR Command is exist in Help
     ${output}=    Issue Command On Karaf Console    tsdr:list\t\t\r
     : FOR    ${list}    IN    @{CATEGORY}\r
     \    Should Contain    ${output}    ${list}\r
-    Wait Until Keyword Succeeds    120s    1s    Verify the Metric is Collected?    ${TSDR_PORTSTATS}    openflow\r
+    Wait Until Keyword Succeeds    620s    1s    Verify the Metric is Collected?    ${TSDR_PORTSTATS}    openflow\r
 \r
 Verification of TSDR PortStats\r
     [Documentation]    Verify the TSDR InterfaceMetrics\r
@@ -44,3 +47,34 @@ Verification of InterfaceMetrics-Attributes on HBase Client
     [Documentation]    Verify the InterfaceMetrics has been updated on HBase Datastore\r
     : FOR    ${list}    IN    @{INTERFACE_METRICS}\r
     \    Verify the Metrics Attributes on Hbase Client    ${list}    openflow:1_1    InterfaceMetrics\r
+\r
+Verify Configuration Interval-change\r
+    [Documentation]    Verify the TSDR Collection configuration changes\r
+    Verify TSDR Configuration Interval    180\r
+    Post TSDR Configuration Interval    200\r
+    Verify TSDR Configuration Interval    200\r
+    Post TSDR Configuration Interval    180\r
+    Verify TSDR Configuration Interval    180\r
+\r
+*** Keywords ***\r
+Initialize the Tsdr Suite\r
+    Initialize the HBase for TSDR\r
+    Start Tsdr Suite\r
+    Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}\r
+\r
+Verify TSDR Configuration Interval\r
+    [Arguments]    ${interval}\r
+    [Documentation]    Verify Configuration interval of TSDR Collection\r
+    ${resp}    RequestsLibrary.Get    session    ${CONFIG_INTERVAL}\r
+    Should Be Equal As Strings    ${resp.status_code}    200\r
+    Should Contain    ${resp.content}    ${interval}\r
+\r
+Post TSDR Configuration Interval\r
+    [Arguments]    ${interval}\r
+    [Documentation]    Configuration TSDR collection interval ${interval}\r
+    ${p1}    Create Dictionary    interval    ${interval}\r
+    ${p2}    Create Dictionary    input    ${p1}\r
+    ${post_data}    Create Dictionary    setPollingInterval    ${p2}\r
+    Log    ${post_data}\r
+    ${resp}    RequestsLibrary.Post    session    ${OPER_INTERVAL}    ${post_data}\r
+    Should Be Equal As Strings    ${resp.status_code}    201\r
index 7833e4a96b7508e9114f457c6ddedff6e1d53ebf..fe18b52035cc12b05183d3d3d1e57ee074ab5366 100644 (file)
@@ -46,22 +46,6 @@ Verification of QueueMetrics-TransmissionErrors on HBase Client
     ${out}=    Query the Data from HBaseClient    ${query}\r
     Should Match Regexp    ${out}    (?mui)TransmissionErrors\r
 \r
-Uninstall all TSDR HBase Feature\r
-    [Documentation]    UnInstall all TSDR HBase Features\r
-    Uninstall a Feature    odl-tsdr-hbase-persistence\r
-    Verify Feature Is Not Installed    odl-tsdr-hbase-persistence\r
-    Uninstall a Feature    odl-hbaseclient\r
-    Verify Feature Is Not Installed    odl-hbaseclient\r
-    Uninstall a Feature    odl-tsdr-core\r
-    Verify Feature Is Not Installed    odl-tsdr-core\r
-    Uninstall a Feature    odl-tsdr-hbase\r
-    Verify Feature Is Not Installed    odl-tsdr-hbase\r
-\r
-Verification TSDR Command shouldnot exist in help\r
-    [Documentation]    Verify the TSDR List command on help\r
-    ${output}=    Issue Command On Karaf Console    tsdr\t    ${CONTROLLER}    ${KARAF_SHELL_PORT}\r
-    Should not Contain    ${output}    tsdr:list\r
-\r
 *** Keyword ***\r
 Configuration of Queue on Switch\r
     [Documentation]    Queue configuration on openvswitch\r
diff --git a/test/csit/suites/tsdr/HBase/050_GroupMetrics.robot b/test/csit/suites/tsdr/HBase/050_GroupMetrics.robot
new file mode 100644 (file)
index 0000000..8b6abd6
--- /dev/null
@@ -0,0 +1,63 @@
+*** Settings ***\r
+Documentation     Test suite for Hbase DataStore FlowGroup Stats Verification\r
+Suite Setup       Run Keywords    Start TSDR suite with CPqD Switch    Configuration of FlowGroup on Switch\r
+Suite Teardown    Stop Tsdr Suite\r
+Library           SSHLibrary\r
+Library           Collections\r
+Library           String\r
+Library           ../../../libraries/Common.py\r
+Resource          ../../../libraries/KarafKeywords.txt\r
+Resource          ../../../libraries/TsdrUtils.txt\r
+Variables         ../../../variables/Variables.py\r
+\r
+*** Variables ***\r
+@{FLOWGROUP_METRICS}    ByteCount    PacketCount    RefCount\r
+${TSDR_FLOWGROUPSTATS}    tsdr:list FlowGroupStats\r
+@{FLOWGROUP_HEADER}    MetricName    MetricValue    MetricCategory    MetricDetails\r
+\r
+*** Test Cases ***\r
+Verify the FlowGroup Stats attributes exist thru Karaf console\r
+    [Documentation]    Verify the FlowGroupStats attributes exist on Karaf Console\r
+    Wait Until Keyword Succeeds    120s    1s    Verify the Metric is Collected?    ${TSDR_FLOWGROUPSTATS}    ByteCount\r
+    ${output}=    Issue Command On Karaf Console    ${TSDR_FLOWGROUPSTATS}    ${CONTROLLER}    ${KARAF_SHELL_PORT}    30\r
+    : FOR    ${list}    IN    @{FLOWGROUP_METRICS}\r
+    \    Should Contain    ${output}    ${list}\r
+\r
+Verification of FlowGroupStats-ByteCount on Karaf Console\r
+    [Documentation]    Verify the FlowGroupStats has been updated thru tsdr:list command on karaf console\r
+    ${tsdr_cmd}=    Concatenate the String    ${TSDR_FLOWGROUPSTATS}    | grep ByteCount | head\r
+    ${output}=    Issue Command On Karaf Console    ${tsdr_cmd}    ${CONTROLLER}    ${KARAF_SHELL_PORT}    90\r
+    Should Contain    ${output}    ByteCount\r
+    Should Contain    ${output}    FlowGroupStats\r
+    Should not Contain    ${output}    null\r
+    : FOR    ${list}    IN    @{FLOWGROUP_HEADER}\r
+    \    Should Contain    ${output}    ${list}\r
+\r
+Verification of FlowGroupStats-ByteCount on HBase Client\r
+    [Documentation]    Verify the FlowGroupStats has been updated on HBase Datastore\r
+    ${query}=    Generate HBase Query    GroupMetrics    ByteCount_openflow:1\r
+    ${out}=    Query the Data from HBaseClient    ${query}\r
+    Should Match Regexp    ${out}    (?mui)ByteCount\r
+\r
+Verification of FlowGroupStats-PacketCount on HBase Client\r
+    [Documentation]    Verify the FlowGroupStats has been updated on HBase Datastore\r
+    ${query}=    Generate HBase Query    GroupMetrics    PacketCount_openflow:1\r
+    ${out}=    Query the Data from HBaseClient    ${query}\r
+    Should Match Regexp    ${out}    (?mui)PacketCount\r
+\r
+Verification of FlowGroupStats-RefCount on HBase Client\r
+    [Documentation]    Verify the FlowGroupStats has been updated on HBase Datastore\r
+    ${query}=    Generate HBase Query    GroupMetrics    RefCount_openflow:1\r
+    ${out}=    Query the Data from HBaseClient    ${query}\r
+    Should Match Regexp    ${out}    (?mui)RefCount\r
+\r
+*** Keyword ***\r
+Start TSDR suite with CPqD Switch\r
+    Start Tsdr Suite    user\r
+\r
+Configuration of FlowGroup on Switch\r
+    [Documentation]    FlowGroup configuration on CPqD\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s1 group-mod cmd=add,group=1,type=all\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s1 flow-mod table=0,cmd=add eth_type=0x800,eth_src=00:01:02:03:04:05 apply:group=1\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s1 ping 10\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s2 ping 10\r
diff --git a/test/csit/suites/tsdr/HBase/060_FlowMeterMetrics.robot b/test/csit/suites/tsdr/HBase/060_FlowMeterMetrics.robot
new file mode 100644 (file)
index 0000000..c617a31
--- /dev/null
@@ -0,0 +1,76 @@
+*** Settings ***\r
+Documentation     Test suite for Hbase DataStore FlowMeter Stats Verification\r
+Suite Setup       Run Keywords    Start TSDR suite with CPqD Switch    Configuration of FlowMeter on Switch\r
+Suite Teardown    Stop Tsdr Suite\r
+Library           SSHLibrary\r
+Library           Collections\r
+Library           String\r
+Library           ../../../libraries/Common.py\r
+Resource          ../../../libraries/KarafKeywords.txt\r
+Resource          ../../../libraries/TsdrUtils.txt\r
+Variables         ../../../variables/Variables.py\r
+\r
+*** Variables ***\r
+@{FLOWMETER_METRICS}    ByteInCount    PacketInCount    FlowCount\r
+${TSDR_FLOWMETERSTATS}    tsdr:list FlowMeterStats\r
+@{FLOWMETER_HEADER}    MetricName    MetricValue    MetricCategory    MetricDetails\r
+\r
+*** Test Cases ***\r
+Verify the FlowMeter Stats attributes exist thru Karaf console\r
+    [Documentation]    Verify the FlowMeterStats attributes exist on Karaf Console\r
+    Wait Until Keyword Succeeds    120s    1s    Verify the Metric is Collected?    ${TSDR_FLOWMETERSTATS}    ByteInCount\r
+    ${output}=    Issue Command On Karaf Console    ${TSDR_FLOWMETERSTATS}    ${CONTROLLER}    ${KARAF_SHELL_PORT}    30\r
+    : FOR    ${list}    IN    @{FLOWMETER_METRICS}\r
+    \    Should Contain    ${output}    ${list}\r
+\r
+Verification of FlowMeterStats-ByteInCount on Karaf Console\r
+    [Documentation]    Verify the FlowMeterStats has been updated thru tsdr:list command on karaf console\r
+    ${tsdr_cmd}=    Concatenate the String    ${TSDR_FLOWMETERSTATS}    | grep ByteInCount | head\r
+    ${output}=    Issue Command On Karaf Console    ${tsdr_cmd}    ${CONTROLLER}    ${KARAF_SHELL_PORT}    90\r
+    Should Contain    ${output}    ByteInCount\r
+    Should Contain    ${output}    FlowMeterStats\r
+    Should not Contain    ${output}    null\r
+    : FOR    ${list}    IN    @{FLOWMETER_HEADER}\r
+    \    Should Contain    ${output}    ${list}\r
+\r
+Verification of FlowMeterStats-ByteInCount on HBase Client\r
+    [Documentation]    Verify the FlowMeterStats has been updated on HBase Datastore\r
+    ${query}=    Generate HBase Query    MeterMetrics    ByteInCount_openflow:1\r
+    ${out}=    Query the Data from HBaseClient    ${query}\r
+    Should Match Regexp    ${out}    (?mui)ByteInCount\r
+\r
+Verification of FlowMeterStats-PacketInCount on HBase Client\r
+    [Documentation]    Verify the FlowMeterStats has been updated on HBase Datastore\r
+    ${query}=    Generate HBase Query    MeterMetrics    PacketInCount_openflow:1\r
+    ${out}=    Query the Data from HBaseClient    ${query}\r
+    Should Match Regexp    ${out}    (?mui)PacketInCount\r
+\r
+Verification of FlowMeterStats-FlowCount on HBase Client\r
+    [Documentation]    Verify the FlowMeterStats has been updated on HBase Datastore\r
+    ${query}=    Generate HBase Query    MeterMetrics    FlowCount_openflow:1\r
+    ${out}=    Query the Data from HBaseClient    ${query}\r
+    Should Match Regexp    ${out}    (?mui)FlowCount\r
+\r
+Uninstall all TSDR HBase Feature\r
+    [Documentation]    UnInstall all TSDR HBase Features\r
+    Uninstall a Feature    odl-tsdr-hbase-persistence odl-hbaseclient odl-tsdr-core odl-tsdr-hbase\r
+    Verify Feature Is Not Installed    odl-tsdr-hbase-persistence\r
+    Verify Feature Is Not Installed    odl-hbaseclient\r
+    Verify Feature Is Not Installed    odl-tsdr-core\r
+    Verify Feature Is Not Installed    odl-tsdr-hbase\r
+\r
+Verification TSDR Command shouldnot exist in help\r
+    [Documentation]    Verify the TSDR List command on help\r
+    ${output}=    Issue Command On Karaf Console    tsdr\t    ${CONTROLLER}    ${KARAF_SHELL_PORT}\r
+    Should not Contain    ${output}    tsdr:list\r
+\r
+*** Keyword ***\r
+Start TSDR suite with CPqD Switch\r
+    Start Tsdr Suite    user\r
+\r
+Configuration of FlowMeter on Switch\r
+    [Documentation]    FlowMeter configuration on CPqD\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s1 meter-mod cmd=add,flags=1,meter=1 drop:rate=100\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s1 flow-mod table=0,cmd=add in_port=1 meter:1 apply:output=2\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s1 ping 10\r
+    Run Command On Remote System    ${MININET}    sudo dpctl unix:/tmp/s2 ping 10\r
diff --git a/test/csit/suites/tsdr/HBase/start-hbase-client.sh b/test/csit/suites/tsdr/HBase/start-hbase-client.sh
deleted file mode 100755 (executable)
index 59defef..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#Downloading and Installation of HBase will be performed during on Controller VM deployment refer controller.sh
-echo "Starting Hbase Server daemon..."
-export JAVA_HOME=/usr
-/tmp/Hbase/hbase-0.94.15/bin/start-hbase.sh
diff --git a/test/csit/suites/tsdr/HBase/stop-hbase-client.sh b/test/csit/suites/tsdr/HBase/stop-hbase-client.sh
deleted file mode 100755 (executable)
index 827477d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-echo "Stoping Hbase Server daemon..."
-export JAVA_HOME=/usr
-/tmp/Hbase/hbase-0.94.15/bin/stop-hbase.sh