Added Testplan to source.
Change-Id: I7fe969340d95c4bdf15f2ea836498096f3de58aa
Signed-off-by: premnath <prem.annauniv@gmail.com>
${hbase_query}= Concatenate the String scan '${table}'
${hbase_query}= Concatenate the String ${hbase_query} ,{ FILTER =>\"(RowFilter(=,
${hbase_query}= Concatenate the String ${hbase_query} 'regexstring:${filter}*\')) AND (RowFilter(=,
- ${hbase_query}= Concatenate the String ${hbase_query} 'regexstring:MN=${metric}*\'))\",LIMIT=>10}
+ ${hbase_query}= Concatenate the String ${hbase_query} 'regexstring:${metric}*\'))\",LIMIT=>10}
[Return] ${hbase_query}
Get Metrics Value
--- /dev/null
+# Place the scripts in run order:
+integration/test/csit/suites/tsdr/HBase/scripts/hbase-startup.sh
*** Variables ***
@{INTERFACE_METRICS} TransmittedPackets TransmittedBytes TransmitErrors TransmitDrops ReceivedPackets ReceivedBytes ReceiveOverRunError
... ReceiveFrameError ReceiveErrors ReceiveDrops ReceiveCrcError CollisionCount
-@{CATEGORY} FLOWGROUPSTATS FLOWMETERSTATS FLOWSTATS FLOWTABLESTATS PORTSTATS QUEUESTATS
-${TSDR_PORTSTATS} tsdr:list PORTSTATS
-${CONFIG_INTERVAL} /restconf/config/tsdr-openflow-statistics-collector:TSDROSCConfig
-${OPER_INTERVAL} /restconf/operations/tsdr-openflow-statistics-collector:setPollingInterval
&{HEADERS_QUERY} Content-Type=application/json Content-Type=application/json
*** Test Cases ***
+
+Init Variables
+ [Documentation] Initialize ODL version specific variables
+ log ${ODL_VERSION}
+ Run Keyword If '${ODL_VERSION}' == 'stable-lithium' Init Variables Lithium
+ ... ELSE Init Variables Master
+
Verification of TSDR HBase Feature Installation
[Documentation] Install and Verify the TSDR HBase Features
COMMENT Install a Feature odl-tsdr-hbase ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 60
Verification of InterfaceMetrics-Attributes on HBase Client
[Documentation] Verify the InterfaceMetrics has been updated on HBase Datastore
: FOR ${list} IN @{INTERFACE_METRICS}
- \ Verify the Metrics Attributes on Hbase Client ${list} Node:openflow:1,NodeConnector:1 PORTSTATS
+ \ Verify the Metrics Attributes on Hbase Client ${list} ${node_connector} ${portstats}
Verify Configuration Interval-change
[Documentation] Verify the TSDR Collection configuration changes
- Wait Until Keyword Succeeds 5x 3 sec Post TSDR Configuration Interval 15000
- Wait Until Keyword Succeeds 5x 3 sec Verify TSDR Configuration Interval 15000
- Wait Until Keyword Succeeds 5x 3 sec Post TSDR Configuration Interval 20000
- Wait Until Keyword Succeeds 5x 3 sec Verify TSDR Configuration Interval 20000
- Wait Until Keyword Succeeds 5x 3 sec Post TSDR Configuration Interval 15000
- Wait Until Keyword Succeeds 5x 3 sec Verify TSDR Configuration Interval 15000
+ Wait Until Keyword Succeeds 5x 3 sec Post TSDR Configuration Interval ${default_poll}
+ Wait Until Keyword Succeeds 5x 3 sec Verify TSDR Configuration Interval ${default_poll}
+ Wait Until Keyword Succeeds 5x 3 sec Post TSDR Configuration Interval ${non_default_poll}
+ Wait Until Keyword Succeeds 5x 3 sec Verify TSDR Configuration Interval ${non_default_poll}
+ Wait Until Keyword Succeeds 5x 3 sec Post TSDR Configuration Interval ${default_poll}
+ Wait Until Keyword Succeeds 5x 3 sec Verify TSDR Configuration Interval ${default_poll}
[Teardown] Report_Failure_Due_To_Bug 5068
*** Keywords ***
+
+Init Variables Master
+ [Documentation] Sets variables specific to latest(master) version
+ Set Suite Variable @{CATEGORY} FLOWGROUPSTATS FLOWMETERSTATS FLOWSTATS FLOWTABLESTATS PORTSTATS QUEUESTATS
+ Set Suite Variable ${TSDR_PORTSTATS} tsdr:list PORTSTATS
+ Set Suite Variable ${CONFIG_INTERVAL} /restconf/config/tsdr-openflow-statistics-collector:TSDROSCConfig
+ Set Suite Variable ${OPER_INTERVAL} /restconf/operations/tsdr-openflow-statistics-collector:setPollingInterval
+ Set Suite Variable ${default_poll} 15000
+ set Suite Variable ${non_default_poll} 20000
+ set Suite Variable ${node_connector} Node:openflow:1,NodeConnector:1
+ set suite Variable ${portstats} PORTSTATS
+
+Init Variables Lithium
+ [Documentation] Sets variables specific to Lithium version
+ Set Suite Variable @{CATEGORY} FlowStats FlowTableStats PortStats QueueStats
+ Set Suite Variable ${TSDR_PORTSTATS} tsdr:list PortStats
+ Set Suite Variable ${CONFIG_INTERVAL} /restconf/config/TSDRDC:TSDRDCConfig
+ Set Suite Variable ${OPER_INTERVAL} /restconf/operations/TSDRDC:setPollingInterval
+ Set Suite Variable ${default_poll} 180
+ set Suite Variable ${non_default_poll} 200
+ set Suite Variable ${node_connector} openflow:1_1
+ set suite Variable ${portstats} InterfaceMetrics
+
Initialize the Tsdr Suite
COMMENT Initialize the HBase for TSDR
Start Tsdr Suite
*** Variables ***
@{FLOW_METRICS} PacketCount ByteCount
-${TSDR_FLOWSTATS} tsdr:list FLOWSTATS
*** Test Cases ***
+
+Init Variables
+ [Documentation] Initialize ODL version specific variables
+ log ${ODL_VERSION}
+ Run Keyword If '${ODL_VERSION}' == 'stable-lithium' Init Variables Lithium
+ ... ELSE Init Variables Master
+
Verification of TSDR FlowMetrics
[Documentation] Verify the TSDR FlowStats
Wait Until Keyword Succeeds 120s 1s Verify the Metric is Collected? ${TSDR_FLOWSTATS} PacketCount
${output}= Issue Command On Karaf Console ${tsdr_cmd} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 90
${Line1}= Get Line ${output} 0
Should Contain ${Line1} PacketCount
- Verify the Metrics Attributes on Hbase Client PacketCount Node:openflow:1,Table:0 FLOWSTATS
-
+ Verify the Metrics Attributes on Hbase Client PacketCount ${node_connector} ${flowstats}
Verification of FlowMetrics-BytesCount on HBase Client
[Documentation] Verify the FlowStats-ByteCount on both Karaf Console and Hbase Client
${tsdr_cmd}= Concatenate the String ${TSDR_FLOWSTATS} | grep ByteCount | head
${output}= Issue Command On Karaf Console ${tsdr_cmd} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 90
${Line1}= Get Line ${output} 0
Should Contain ${Line1} ByteCount
- Verify the Metrics Attributes on Hbase Client ByteCount Node:openflow:1,Table:0 FLOWSTATS
+ Verify the Metrics Attributes on Hbase Client ByteCount ${node_connector} ${flowstats}
+
+*** Keywords ***
+
+Init Variables Master
+ [Documentation] Sets variables specific to latest(master) version
+ Set Suite Variable ${TSDR_FLOWSTATS} tsdr:list FLOWSTATS
+ set Suite Variable ${node_connector} Node:openflow:1,Table:0
+ set suite Variable ${flowstats} FLOWSTATS
+
+Init Variables Lithium
+ [Documentation] Sets variables specific to Lithium version
+ Set Suite Variable ${TSDR_FLOWSTATS} tsdr:list FlowStats
+ set Suite Variable ${node_connector} openflow:1_0
+ set suite Variable ${flowstats} FlowMetrics
+
${TSDR_FLOWTABLE_STATS} tsdr:list FLOWTABLESTATS
*** Test Cases ***
+
+Init Variables
+ [Documentation] Initialize ODL version specific variables
+ log ${ODL_VERSION}
+ Run Keyword If '${ODL_VERSION}' == 'stable-lithium' Init Variables Lithium
+ ... ELSE Init Variables Master
+
Verification of TSDR FlowTableMetrics
[Documentation] Verify the TSDR FlowTableMetrics
- Wait Until Keyword Succeeds 120s 1s Verify the Metric is Collected? ${TSDR_FLOWTABLE_STATS} MN
+ Wait Until Keyword Succeeds 120s 1s Verify the Metric is Collected? ${TSDR_FLOWTABLE_STATS} openflow
${output}= Issue Command On Karaf Console ${TSDR_FLOWTABLE_STATS} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
- Should Contain ${output} MN
+ Should Contain ${output} openflow
Verification of FlowTableMetrics on Karaf Console
[Documentation] Verify the FlowTableMetrics has been updated thru tsdr:list command on karaf console
Verification of FlowTableMetrics-ActiveFlows on HBase Client
[Documentation] Verify the FlowTableMetrics has been updated on HBase Datastore
- Verify the Metrics Attributes on Hbase Client ActiveFlows Node:openflow:1,Table:0 FLOWTABLESTATS
+ Verify the Metrics Attributes on Hbase Client ActiveFlows ${node_connector} ${flowtablestats}
Verification of FlowTableMetrics-PacketMatch on HBase Client
[Documentation] Verify the FlowTableMetrics has been updated on HBase Datastore
- Verify the Metrics Attributes on Hbase Client PacketMatch Node:openflow:1,Table:0 FLOWTABLESTATS
+ Verify the Metrics Attributes on Hbase Client PacketMatch ${node_connector} ${flowtablestats}
Verification of FlowTableMetrics-PacketLookup on HBase Client
[Documentation] Verify the FlowTableMetrics has been updated on HBase Datastore
- Verify the Metrics Attributes on Hbase Client PacketLookup Node:openflow:1,Table:0 FLOWTABLESTATS
+ Verify the Metrics Attributes on Hbase Client PacketLookup ${node_connector} ${flowtablestats}
+
+*** Keywords ***
+
+Init Variables Master
+ [Documentation] Sets variables specific to latest(master) version
+ Set Suite Variable ${TSDR_FLOWSTATS} tsdr:list FLOWTABLESTATS
+ set Suite Variable ${node_connector} Node:openflow:1,Table:0
+ set suite Variable ${flowtablestats} FLOWTABLESTATS
+
+Init Variables Lithium
+ [Documentation] Sets variables specific to Lithium version
+ Set Suite Variable ${TSDR_FLOWSTATS} tsdr:list FlowTableStats
+ set Suite Variable ${node_connector} openflow:1_0
+ set suite Variable ${flowtablestats} FlowTableMetrics
+
*** Variables ***
@{QUEUE_METRICS} TransmittedPackets TransmittedBytes TransmissionErrors
-${TSDR_QUEUESTATS} tsdr:list QUEUESTATS
*** Test Cases ***
+
+Init Variables
+ [Documentation] Initialize ODL version specific variables
+ log ${ODL_VERSION}
+ Run Keyword If '${ODL_VERSION}' == 'stable-lithium' Init Variables Lithium
+ ... ELSE Init Variables Master
+
Verify the Queue Metrics attributes exist thru Karaf console
[Documentation] Verify the QueueMetrics attributes exist on Karaf Console
Wait Until Keyword Succeeds 180s 1s Verify the Metric is Collected? ${TSDR_QUEUESTATS} Transmitted
Verification of QueueMetrics-TransmittedPackets on HBase Client
[Documentation] Verify the QueueMetrics has been updated on HBase Datastore
- Verify the Metrics Attributes on Hbase Client TransmittedPackets Node:openflow:2 QUEUESTATS
+ Verify the Metrics Attributes on Hbase Client TransmittedPackets ${node_connector} ${queuestats}
Verification of QueueMetrics-TransmittedBytes on HBase Client
[Documentation] Verify the QueueMetrics has been updated on HBase Datastore
- Verify the Metrics Attributes on Hbase Client TransmittedBytes Node:openflow:2 QUEUESTATS
+ Verify the Metrics Attributes on Hbase Client TransmittedBytes ${node_connector} ${queuestats}
Verification of QueueMetrics-TransmissionErrors on HBase Client
[Documentation] Verify the QueueMetrics has been updated on HBase Datastore
- Verify the Metrics Attributes on Hbase Client TransmissionErrors Node:openflow:2 QUEUESTATS
+ Verify the Metrics Attributes on Hbase Client TransmissionErrors ${node_connector} ${queuestats}
*** Keyword ***
Configuration of Queue on Switch
[Documentation] Queue configuration on openvswitch
Configure the Queue on Switch s2-eth2
+
+*** Keywords ***
+
+Init Variables Master
+ [Documentation] Sets variables specific to latest(master) version
+ Set Suite Variable ${TSDR_QUEUESTATS} tsdr:list QUEUESTATS
+ set Suite Variable ${node_connector} Node:openflow:2
+ set suite Variable ${queuestats} QUEUESTATS
+
+Init Variables Lithium
+ [Documentation] Sets variables specific to Lithium version
+ Set Suite Variable ${TSDR_QUEUESTATS} tsdr:list QueueStats
+ set Suite Variable ${node_connector} openflow:2
+ set suite Variable ${queuestats} QueueMetrics
+
*** Variables ***
@{INTERFACE_METRICS} TransmittedPackets TransmittedBytes TransmitErrors TransmitDrops ReceivedPackets ReceivedBytes ReceiveOverRunError
... ReceiveFrameError ReceiveErrors ReceiveDrops ReceiveCrcError CollisionCount
-@{CATEGORY} FLOWGROUPSTATS FLOWMETERSTATS FLOWSTATS FLOWTABLESTATS PORTSTATS QUEUESTATS
-${TSDR_PORTSTATS} tsdr:list PORTSTATS
*** Test Cases ***
+Init Variables
+ [Documentation] Initialize ODL version specific variables
+ log ${ODL_VERSION}
+ Run Keyword If '${ODL_VERSION}' == 'stable-lithium' Init Variables Lithium
+ ... ELSE Init Variables Master
+
Verification of TSDR HSQLDB Feature Installation
[Documentation] Install and Verify the TSDR HSQLDB Datastore and JDBC
COMMENT Install a Feature odl-tsdr-hsqldb ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 60
COMMENT Install a Feature odl-tsdr-openflow-statistics-collector ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 60
- Wait Until Keyword Succeeds 120s 1s Verify the Metric is Collected? log:display | grep "Connecting to HSQLDB" HSQLDB
- Verify Feature Is Installed odl-tsdr-hsqldb
+ Verify Feature Is Installed ${HSQLDB_INSTALL}
Verify Feature Is Installed odl-tsdr-core
- Verify Feature Is Installed odl-tsdr-openflow-statistics-collector
Verification TSDR Command exists in Help
[Documentation] Verify the TSDR List command on Help
\ ${tsdr_cmd}= Concatenate the String ${TSDR_PORTSTATS} | grep ${list} | head
\ ${output}= Issue Command On Karaf Console ${tsdr_cmd} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
\ Should Contain ${output} ${list}
+
+*** Keywords ***
+Init Variables Master
+ [Documentation] Sets variables specific to latest(master) version
+ Set Suite Variable @{CATEGORY} FLOWGROUPSTATS FLOWMETERSTATS FLOWSTATS FLOWTABLESTATS PORTSTATS QUEUESTATS
+ Set Suite Variable ${TSDR_PORTSTATS} tsdr:list PORTSTATS
+ Set Suite Variable ${HSQLDB_INSTALL} odl-tsdr-hsqldb
+
+Init Variables Lithium
+ [Documentation] Sets variables specific to Lithium version
+ Set Suite Variable @{CATEGORY} FlowStats FlowTableStats PortStats QueueStats
+ Set Suite Variable ${TSDR_PORTSTATS} tsdr:list PortStats
+ Set Suite Variable ${HSQLDB_INSTALL} odl-tsdr-HSQLDB
*** Variables ***
@{FLOW_METRICS} PacketCount ByteCount
-${TSDR_FLOWSTATS} tsdr:list FLOWSTATS
*** Test Cases ***
+Init Variables
+ [Documentation] Initialize ODL version specific variables
+ log ${ODL_VERSION}
+ Run Keyword If '${ODL_VERSION}' == 'stable-lithium' Init Variables Lithium
+ ... ELSE Init Variables Master
+
+
Verification of TSDR FlowMetrics
[Documentation] Verify the TSDR FLOWSTATS
Wait Until Keyword Succeeds 60s 1s Verify the Metric is Collected? ${TSDR_FLOWSTATS} PacketCount
${output}= Issue Command On Karaf Console ${TSDR_FLOWSTATS} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
: FOR ${list} IN @{FLOW_METRICS}
\ Should Contain ${output} ${list}
+
+*** Keywords ***
+Init Variables Master
+ [Documentation] Sets variables specific to latest(master) version
+ Set Suite Variable ${TSDR_FLOWSTATS} tsdr:list FLOWSTATS
+
+Init Variables Lithium
+ [Documentation] Sets variables specific to Lithium version
+ Set Suite Variable ${TSDR_FLOWSTATS} tsdr:list FlowStats
*** Variables ***
@{FLOWTABLE_METRICS} ActiveFlows PacketLookup PacketMatch
-${TSDR_FLOWTABLE_STATS} tsdr:list FLOWTABLESTATS
*** Test Cases ***
+Init Variables
+ [Documentation] Initialize ODL version specific variables
+ log ${ODL_VERSION}
+ Run Keyword If '${ODL_VERSION}' == 'stable-lithium' Init Variables Lithium
+ ... ELSE Init Variables Master
+
Verification of TSDR FLOWTABLESTATS
[Documentation] Verify the TSDR FlowiTableStats
Wait Until Keyword Succeeds 60s 1s Verify the Metric is Collected? ${TSDR_FLOWTABLE_STATS}| grep ActiveFlow | grep openflow:1 FLOWTABLESTATS
${output}= Issue Command On Karaf Console ${TSDR_FLOWTABLE_STATS}| grep openflow:1 | head ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 180
: FOR ${list} IN @{FLOWTABLE_METRICS}
\ Should Contain ${output} ${list}
+
+*** Keywords ***
+Init Variables Master
+ [Documentation] Sets variables specific to latest(master) version
+ Set Suite Variable ${TSDR_FLOWTABLE_STATS} tsdr:list FLOWTABLESTATS
+
+Init Variables Lithium
+ [Documentation] Sets variables specific to Lithium version
+ Set Suite Variable ${TSDR_FLOWTABLE_STATS} tsdr:list FlowTableStats
+
*** Variables ***
@{QUEUE_METRICS} TransmittedPackets TransmittedBytes TransmissionErrors
-${TSDR_QUEUE_STATS} tsdr:list QUEUESTATS
*** Test Cases ***
+Init Variables
+ [Documentation] Initialize ODL version specific variables
+ log ${ODL_VERSION}
+ Run Keyword If '${ODL_VERSION}' == 'stable-lithium' Init Variables Lithium
+ ... ELSE Init Variables Master
+
Verify the QueueStats attributes exist thru Karaf console
[Documentation] Verify the QueueMetrics attributes exist on Karaf Console
Wait Until Keyword Succeeds 60s 1s Verify the Metric is Collected? ${TSDR_QUEUE_STATS} Transmitted
Configuration of Queue on Switch
[Documentation] Queue configuration on openvswitch
Configure the Queue on Switch s2-eth2
+
+Init Variables Master
+ [Documentation] Sets variables specific to latest(master) version
+ Set Suite Variable ${TSDR_QUEUE_STATS} tsdr:list QUEUESTATS
+
+Init Variables Lithium
+ [Documentation] Sets variables specific to Lithium version
+ Set Suite Variable ${TSDR_QUEUE_STATS} tsdr:list QueueStats
+
--- /dev/null
+# Place the suites in run order:
+integration/test/csit/suites/tsdr/HBase/010_InterfaceMetrics.robot
+integration/test/csit/suites/tsdr/HBase/020_FlowMetrics.robot
+integration/test/csit/suites/tsdr/HBase/030_FlowTableMetrics.robot
+integration/test/csit/suites/tsdr/HBase/040_QueueMetrics.robot
--- /dev/null
+# Place the suites in run order:
+integration/test/csit/suites/tsdr/HSQLDB/010_InterfaceMetrics.robot
+integration/test/csit/suites/tsdr/HSQLDB/020_FlowMetrics.robot
+integration/test/csit/suites/tsdr/HSQLDB/030_FlowTableMetrics.robot
+integration/test/csit/suites/tsdr/HSQLDB/040_QueueMetrics.robot