2 Documentation Test suite for Hbase DataStore PortStats Verification
3 Suite Setup Initialize the Tsdr Suite
4 Suite Teardown Stop Tsdr Suite
8 Library RequestsLibrary
9 Library ../../../libraries/Common.py
10 Resource ../../../libraries/KarafKeywords.robot
11 Resource ../../../libraries/TsdrUtils.robot
12 Variables ../../../variables/Variables.py
15 @{INTERFACE_METRICS} TransmittedPackets TransmittedBytes TransmitErrors TransmitDrops ReceivedPackets ReceivedBytes ReceiveOverRunError
16 ... ReceiveFrameError ReceiveErrors ReceiveDrops ReceiveCrcError CollisionCount
17 @{CATEGORY} FLOWGROUPSTATS FLOWMETERSTATS FLOWSTATS FLOWTABLESTATS PORTSTATS QUEUESTATS
18 ${TSDR_PORTSTATS} tsdr:list PORTSTATS
19 ${CONFIG_INTERVAL} /restconf/config/tsdr-openflow-statistics-collector:TSDRDCConfig
20 ${OPER_INTERVAL} /restconf/operations/tsdr-openflow-statistics-collector:setPollingInterval
23 Verification of TSDR HBase Feature Installation
24 [Documentation] Install and Verify the TSDR HBase Features
25 COMMENT Install a Feature odl-tsdr-hbase ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 60
26 Verify Feature Is Installed odl-tsdr-hbase
27 Verify Feature Is Installed odl-hbaseclient
29 Verification TSDR Command is exist in Help
30 [Documentation] Verify the TSDR List command on Help
31 ${output}= Issue Command On Karaf Console tsdr\t
32 Should Contain ${output} tsdr:list
33 ${output}= Issue Command On Karaf Console tsdr:list\t\t
34 : FOR ${list} IN @{CATEGORY}
35 \ Should Contain ${output} ${list}
36 Wait Until Keyword Succeeds 620s 1s Verify the Metric is Collected? ${TSDR_PORTSTATS} openflow
38 Verification of TSDR PortStats
39 [Documentation] Verify the TSDR InterfaceMetrics
40 : FOR ${list} IN @{INTERFACE_METRICS}
41 \ ${tsdr_cmd}= Concatenate the String ${TSDR_PORTSTATS} | grep ${list} | head
42 \ ${output}= Issue Command On Karaf Console ${tsdr_cmd} ${ODL_SYSTEM_IP} ${KARAF_SHELL_PORT} 30
43 \ Should Contain ${output} ${list}
45 Verification of InterfaceMetrics-Attributes on HBase Client
46 [Documentation] Verify the InterfaceMetrics has been updated on HBase Datastore
47 : FOR ${list} IN @{INTERFACE_METRICS}
48 \ Verify the Metrics Attributes on Hbase Client ${list} Node:openflow:1,NodeConnector:1 PORTSTATS
50 Verify Configuration Interval-change
51 [Documentation] Verify the TSDR Collection configuration changes
52 Verify TSDR Configuration Interval 180
53 Post TSDR Configuration Interval 200
54 Verify TSDR Configuration Interval 200
55 Post TSDR Configuration Interval 180
56 Verify TSDR Configuration Interval 180
59 Initialize the Tsdr Suite
60 COMMENT Initialize the HBase for TSDR
62 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
64 Verify TSDR Configuration Interval
65 [Arguments] ${interval}
66 [Documentation] Verify Configuration interval of TSDR Collection
67 ${resp} RequestsLibrary.Get Request session ${CONFIG_INTERVAL}
68 LOG ${resp.content} WARN
69 Should Be Equal As Strings ${resp.status_code} 200
70 Should Contain ${resp.content} ${interval}
72 Post TSDR Configuration Interval
73 [Arguments] ${interval}
74 [Documentation] Configuration TSDR collection interval ${interval}
75 ${p1} Create Dictionary interval=${interval}
76 ${p2} Create Dictionary input=${p1}
77 ${post_data} Create Dictionary setPollingInterval=${p2}
79 ${resp} RequestsLibrary.Post Request session ${OPER_INTERVAL} ${post_data}
80 Should Be Equal As Strings ${resp.status_code} 201