Library HttpLibrary.HTTP
*** Variables ***
-${HBASE_CLIENT} /usr/lib/hbase/hbase-0.94.15/bin
+${HBASE_CLIENT} /tmp/Hbase/hbase-0.94.15/bin
${CASSANDRA_CLIENT} /tmp/cassandra/apache-cassandra-2.1.12/bin
${final} ${EMPTY}
${prompt_timeout} ${EMPTY}
[Documentation] TSDR specific setup/cleanup work that can be done safely before any system.
... is run.
Clean Mininet System
- ${mininet_conn_id1}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
+ ${mininet_conn_id1}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=120s
Set Suite Variable ${mininet_conn_id1}
Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
Execute Command sudo ovs-vsctl set-manager ptcp:6644
Write pingall
Read Until mininet>
-Iperf All Hosts
+Ping Pair Hosts
[Arguments] ${host1} ${host2}
- [Documentation] Iperf between ${host1} and ${host2}
+ [Documentation] Ping between ${host1} and ${host2}
Switch Connection ${mininet_conn_id1}
- Write iperf ${host1} ${host2}
+ Write pingpair ${host1} ${host2}
Read Until mininet>
-
-Iperf All Hosts Hbase
+Ping Pair Hosts Hbase
[Arguments] ${pattern}
- [Documentation] Iperf between h1 and h2 and check Hbase
- Iperf All Hosts h1 h2
+ [Documentation] Ping between h1 and h2 and check Hbase
+ Ping Pair Hosts h1 h2
${query_output}= Query the Data from HBaseClient count 'NETFLOW'
Should Match Regexp ${query_output} ${pattern}
-Iperf All Hosts Cassandra
+Ping Pair Hosts Cassandra
[Arguments] ${pattern}
- [Documentation] Iperf between h1 and h2 and check Cassandra
- Iperf All Hosts h1 h2
+ [Documentation] Ping between h1 and h2 and check Cassandra
+ Ping Pair Hosts h1 h2
${query_output}= Count Cassandra rows select count(*) from tsdr.metriclog;
Should Match Regexp ${query_output} ${pattern}
-Iperf All Hosts HSQLDB
+Ping Pair 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
+ Ping Pair Hosts h1 h2
+ ${query_output}= Issue Command On Karaf Console tsdr:list NETFLOW | wc -l
Should Match Regexp ${query_output} ${pattern}
Stop Tsdr Suite
${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.
${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}
[Return] ${metric_count}
Verify Metric log File
- [Arguments] ${pattern}
- [Documentation] Returns Value for lines in Metriclog file matching the pattern
+ [Arguments] ${metric_log} ${pattern}
+ [Documentation] Returns Value for lines in Metriclog matching the pattern
${contents}= Grep From File ${CASSANDRA_DB_PATH}${temp_metric_val} ${pattern}
[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}
Find Metricval Keys
[Arguments] ${pattern} ${file}
[Documentation] Return list element which has the particular pattern.
- ${db_grep}= Grep From File ${CASSANDRA_DB_PATH}${file} ${pattern}
${metric_grep}= Grep From File ${TSDR_PATH}/tsdrKeyCache.txt ${pattern}
@{split_line}= Split String ${metric_grep} |
${keypath}= Get From List ${split_line} 0
- Should Contain ${db_grep} ${keypath}
[Return] @{split_line}
Copy TSDR tables
${keya_bool}= Evaluate ${keya} < 0
${keya}= Run Keyword If '${keya_bool}' == 'True' Catenate SEPARATOR= \\ ${keya}
... ELSE Catenate ${keya}
- Create Temporary Key Info ${keya} ${keyb} val_table=${metric_log}
+ ${metric_log}= Create Temporary Key Info ${keya} ${keyb} val_table=metriclog
+ [Return] ${metric_log}
Iterating over metricpath
[Documentation] Used to traverse over metricpath file and traverse over metricpath file and get the keys
Append To File snmp.cfg \n
Move File snmp.cfg ${SNMP_PATH}
+Bringup Netflow
+ [Documentation] Brings up basic netflow setup .
+ Verify Feature Is Installed odl-tsdr-netflow-statistics-collector
+ Wait Until Keyword Succeeds 24x 10 sec Check Karaf Log Has Messages NetFlow Data Colletor Initialized
+ Start Tsdr Suite
+ Ping All Hosts
+ Configure Netflow
+
Collect Data from SNMP Agent
[Arguments] ${SNMP_IP}=127.0.0.1 ${SNMP_AGENT_COMM}=${SNMP_COMMUNITY}
[Documentation] Poll for SNMP Agent OID
\ ${ifMtu}= Get From Dictionary ${int} ifMtu
\ ${ifOperStatus1}= Get From Dictionary ${int} ifOperStatus
\ ${ifOperStatus}= Get From Dictionary ${OPER_STATUS} ${ifOperStatus1}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfOutDiscards*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutDiscards*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutDiscards | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutDiscards
\ Append To List ${SNMP_VALUES} ${ifOutDiscards}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfInDiscards*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInDiscards*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInDiscards | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInDiscards
\ Append To List ${SNMP_VALUES} ${ifInDiscards}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfInOctets*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInOctets*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInOctets | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInOctets
\ Append To List ${SNMP_VALUES} ${ifInOctets}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfOutQLen*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutQLen*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutQLen | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutQLen
\ Append To List ${SNMP_VALUES} ${ifOutQLen}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfOutErrors*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutErrors*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutErrors | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutErrors
\ Append To List ${SNMP_VALUES} ${ifOutErrors}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfInUcastPkts*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInUcastPkts*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInUcastPkts | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInUcastPkts
\ Append To List ${SNMP_VALUES} ${ifInUcastPkts}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfOutNUcastPkts*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutNUcastPkts*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutNUcastPkts | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutNUcastPkts
\ Append To List ${SNMP_VALUES} ${ifOutNUcastPkts}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfInErrors*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInErrors*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInErrors | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInErrors
\ Append To List ${SNMP_VALUES} ${ifInErrors}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfOutOctets*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutOctets*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutOctets | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutOctets
\ Append To List ${SNMP_VALUES} ${ifOutOctets}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfAdminStatus*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfAdminStatus*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfAdminStatus | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfAdminStatus
\ Append To List ${SNMP_VALUES} ${ifAdminStatus}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfInUnknownProtos*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInUnknownProtos*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInUnknownProtos | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInUnknownProtos
\ Append To List ${SNMP_VALUES} ${ifInUnknownProtos}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfOutUcastPkts*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutUcastPkts*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOutUcastPkts | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOutUcastPkts
\ Append To List ${SNMP_VALUES} ${ifOutUcastPkts}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfInNUcastPkts*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInNUcastPkts*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfInNUcastPkts | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfInNUcastPkts
\ Append To List ${SNMP_VALUES} ${ifInNUcastPkts}
- \ Append To List ${SNMP_ENTRY} *NID=${SNMP_IP}*DC=SNMPINTERFACES*MN=IfOperStatus*RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOperStatus*
+ \ Append To List ${SNMP_ENTRY} grep NID=${SNMP_IP} | grep DC=SNMPINTERFACES | grep MN=IfOperStatus | grep RK=ifIndex:${ifindex},ifName:Iso88023Csmacd,SnmpMetric:IfOperStatus
\ Append To List ${SNMP_VALUES} ${ifOperStatus}
[Return] ${SNMP_ENTRY} ${SNMP_VALUES}