Replace deprecated variables in suites/l2switch (1).
[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 Variables         ../../../variables/Variables.py
8
9 *** Variables ***
10 ${IP_1}           "10.0.0.1"
11 ${IP_2}           "10.0.0.2"
12 ${IP_3}           "10.0.0.3"
13
14 *** Test Cases ***
15 Check Stats for node 1
16     [Documentation]    Get the stats for a node
17     Wait Until Keyword Succeeds    10s    2s    Check Nodes Stats    openflow:1
18
19 Check Stats for node 2
20     [Documentation]    Get the stats for a node
21     Wait Until Keyword Succeeds    10s    2s    Check Nodes Stats    openflow:2
22
23 Check Stats for node 3
24     [Documentation]    Get the stats for a node
25     Wait Until Keyword Succeeds    10s    2s    Check Nodes Stats    openflow:3
26
27 Check No Host Is Present
28     [Documentation]    Get the invnetory, should not contain any host address
29     @{list}    Create List    ${IP_1}    ${IP_2}    ${IP_3}
30     Wait Until Keyword Succeeds    10s    2s    Check For Elements Not At URI    ${OPERATIONAL_NODES_API}    ${list}
31
32 Ping All
33     [Documentation]    Pingall, verify no packet loss
34     Write    pingall
35     ${result}    Read Until    mininet>
36     Should Contain    ${result}    Results: 0% dropped
37
38 Check node 1 addresses
39     [Documentation]    Get the address observations for node 1
40     @{list}    Create List    ${IP_2}    ${IP_3}
41     Wait Until Keyword Succeeds    10s    2s    Check For Specific Number Of Elements At URI    ${OPERATIONAL_NODES_API}/node/openflow:1    ${IP_1}    1
42     Wait Until Keyword Succeeds    10s    2s    Check For Elements Not At URI    ${OPERATIONAL_NODES_API}/node/openflow:1    ${list}
43
44 Check node 2 addresses
45     [Documentation]    Get the address observations for node 2
46     @{list}    Create List    ${IP_1}    ${IP_3}
47     Wait Until Keyword Succeeds    10s    2s    Check For Specific Number Of Elements At URI    ${OPERATIONAL_NODES_API}/node/openflow:2    ${IP_2}    1
48     Wait Until Keyword Succeeds    10s    2s    Check For Elements Not At URI    ${OPERATIONAL_NODES_API}/node/openflow:2    ${list}
49
50 Check node 3 addresses
51     [Documentation]    Get the address observations for node 3
52     @{list}    Create List    ${IP_1}    ${IP_2}
53     Wait Until Keyword Succeeds    10s    2s    Check For Specific Number Of Elements At URI    ${OPERATIONAL_NODES_API}/node/openflow:3    ${IP_3}    1
54     Wait Until Keyword Succeeds    10s    2s    Check For Elements Not At URI    ${OPERATIONAL_NODES_API}/node/openflow:3    ${list}