Replace Bierman02 with RFC8040 for OpenFlow Plugin
[integration/test.git] / csit / suites / l2switch / Address_Tracking_OF13 / 010__restconf_inv_addresses.robot
1 *** Settings ***
2 Documentation     Test suite for AddressObservations in RESTCONF inventory
3 Suite Setup       Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
4 Suite Teardown    Delete All Sessions
5 Library           RequestsLibrary
6 Resource          ../../../libraries/Utils.robot
7 Resource          ../../../variables/openflowplugin/Variables.robot
8 Variables         ../../../variables/Variables.py
9
10 *** Variables ***
11 ${IP_1}           "10.0.0.1"
12 ${IP_2}           "10.0.0.2"
13 ${IP_3}           "10.0.0.3"
14
15 *** Test Cases ***
16 Check Stats for node 1
17     [Documentation]    Get the stats for a node
18     Wait Until Keyword Succeeds    10s    2s    Check Nodes Stats    openflow%3A1
19
20 Check Stats for node 2
21     [Documentation]    Get the stats for a node
22     Wait Until Keyword Succeeds    10s    2s    Check Nodes Stats    openflow%3A2
23
24 Check Stats for node 3
25     [Documentation]    Get the stats for a node
26     Wait Until Keyword Succeeds    10s    2s    Check Nodes Stats    openflow%3A3
27
28 Check No Host Is Present
29     [Documentation]    Get the invnetory, should not contain any host address
30     @{list}    Create List    ${IP_1}    ${IP_2}    ${IP_3}
31     Wait Until Keyword Succeeds    10s    2s    Check For Elements Not At URI    ${RFC8040_OPERATIONAL_NODES_API}    ${list}
32
33 Ping All
34     [Documentation]    Pingall, verify no packet loss
35     Wait Until Keyword Succeeds    10s    2s    Ping All Works Good
36
37 Check node 1 addresses
38     [Documentation]    Get the address observations for node 1
39     @{list}    Create List    ${IP_2}    ${IP_3}
40     Wait Until Keyword Succeeds    10s    2s    Check For Specific Number Of Elements At URI    ${RFC8040_NODES_API}/node=openflow%3A1?content=nonconfig    ${IP_1}    1
41     Wait Until Keyword Succeeds    10s    2s    Check For Elements Not At URI    ${RFC8040_NODES_API}/node=openflow%3A1?content=nonconfig    ${list}
42
43 Check node 2 addresses
44     [Documentation]    Get the address observations for node 2
45     @{list}    Create List    ${IP_1}    ${IP_3}
46     Wait Until Keyword Succeeds    10s    2s    Check For Specific Number Of Elements At URI    ${RFC8040_NODES_API}/node=openflow%3A2?content=nonconfig    ${IP_2}    1
47     Wait Until Keyword Succeeds    10s    2s    Check For Elements Not At URI    ${RFC8040_NODES_API}/node=openflow%3A2?content=nonconfig    ${list}
48
49 Check node 3 addresses
50     [Documentation]    Get the address observations for node 3
51     @{list}    Create List    ${IP_1}    ${IP_2}
52     Wait Until Keyword Succeeds    10s    2s    Check For Specific Number Of Elements At URI    ${RFC8040_NODES_API}/node=openflow%3A3?content=nonconfig    ${IP_3}    1
53     Wait Until Keyword Succeeds    10s    2s    Check For Elements Not At URI    ${RFC8040_NODES_API}/node=openflow%3A3?content=nonconfig    ${list}
54
55 *** Keywords ***
56 Ping All Works Good
57     Write    pingall
58     ${result}    Read Until    mininet>
59     Should Contain    ${result}    Results: 0% dropped