99b3dda00f896a764665c55f3490ee4813648720
[integration/test.git] / csit / suites / tsdr / HSQLDB / 070_Netflow.robot
1 *** Settings ***
2 Documentation     Test suite for HSQLDB DataStore NetFlow Stats Verification
3 Suite Setup       Initialize Netflow
4 Suite Teardown    Stop Tsdr Suite
5 Library           SSHLibrary
6 Library           Collections
7 Library           String
8 Library           ../../../libraries/Common.py
9 Resource          ../../../libraries/KarafKeywords.robot
10 Resource          ../../../libraries/TsdrUtils.robot
11 Variables         ../../../variables/Variables.py
12
13 *** Variables ***
14 ${IP_1}    10.0.0.1
15 ${IP_2}    10.0.0.2
16 ${NODE_ID}    127.0.0.1
17 ${engine_type}    11
18 ${engine_id}    11
19 ${nexthop}    0
20 ${port}    0
21 ${prot}    1
22 ${int1}    1
23 ${int2}    2
24 ${version}    5
25 *** Test Cases ***
26
27
28 Verification of Full Record Text for Netflow Dumps
29     [Documentation]    Verify the Netflow Record Text Hbase client
30     ${out}=    Issue Command On Karaf Console     tsdr:list NETFLOW | grep srcAddr=${IP_2}
31     Should Contain    ${out}    srcPort=${port}
32     Should Contain    ${out}    srcAddr=${IP_2}
33     Should Contain    ${out}    dstAddr=${IP_1}
34     Should Contain    ${out}    srcPort=${port}
35     Should Contain    ${out}    protocol=${prot}
36     Should Contain    ${out}    nextHop=${nexthop}
37     Should Contain    ${out}    engine_type
38     Should Contain    ${out}    engine_id
39     Should Contain    ${out}    input=${int2}
40     Should Contain    ${out}    output=${int1}
41
42     ${out}=    Issue Command On Karaf Console     tsdr:list NETFLOW | grep srcAddr=${IP_1}
43     Should Contain    ${out}    srcAddr=${IP_1}
44     Should Contain    ${out}    dstAddr=${IP_2}
45     Should Contain    ${out}    dstPort=${port}
46     Should Contain    ${out}    protocol=${prot}
47     Should Contain    ${out}    nextHop=${nexthop}
48     Should Contain    ${out}    engine_type
49     Should Contain    ${out}    engine_id
50     Should Contain    ${out}    input=${int1}
51     Should Contain    ${out}    output=${int2}
52     Should Contain    ${out}    sysUpTime
53     Should Contain    ${out}    flow_sequence
54     Should Contain    ${out}    unix_nsecs
55     Should Contain    ${out}    dPkts
56     Should Contain    ${out}    dOctets
57     Should Contain    ${out}    tcpFlags
58     Should Contain    ${out}    dstAS=0
59     Should Contain    ${out}    srcAS=0
60     Should Contain    ${out}    dstMask=0
61     Should Contain    ${out}    srcMask=0
62
63 *** Keywords ***
64 Initialize Netflow
65     [Documentation]    Initialize Mininet topology and check if netflow data is getting collected
66     Bringup Netflow
67     Wait Until Keyword Succeeds    36x    5 sec    Ping Pair Hosts HSQLDB    2\\d+
68
69
70
71