l2switch suite stabilization
[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     Wait Until Keyword Succeeds    10s    2s    Ping All Works Good
35
36 Check node 1 addresses
37     [Documentation]    Get the address observations for node 1
38     @{list}    Create List    ${IP_2}    ${IP_3}
39     Wait Until Keyword Succeeds    10s    2s    Check For Specific Number Of Elements At URI    ${OPERATIONAL_NODES_API}/node/openflow:1    ${IP_1}    1
40     Wait Until Keyword Succeeds    10s    2s    Check For Elements Not At URI    ${OPERATIONAL_NODES_API}/node/openflow:1    ${list}
41
42 Check node 2 addresses
43     [Documentation]    Get the address observations for node 2
44     @{list}    Create List    ${IP_1}    ${IP_3}
45     Wait Until Keyword Succeeds    10s    2s    Check For Specific Number Of Elements At URI    ${OPERATIONAL_NODES_API}/node/openflow:2    ${IP_2}    1
46     Wait Until Keyword Succeeds    10s    2s    Check For Elements Not At URI    ${OPERATIONAL_NODES_API}/node/openflow:2    ${list}
47
48 Check node 3 addresses
49     [Documentation]    Get the address observations for node 3
50     @{list}    Create List    ${IP_1}    ${IP_2}
51     Wait Until Keyword Succeeds    10s    2s    Check For Specific Number Of Elements At URI    ${OPERATIONAL_NODES_API}/node/openflow:3    ${IP_3}    1
52     Wait Until Keyword Succeeds    10s    2s    Check For Elements Not At URI    ${OPERATIONAL_NODES_API}/node/openflow:3    ${list}
53
54 *** Keywords ***
55 Ping All Works Good
56     Write    pingall
57     ${result}    Read Until    mininet>
58     Should Contain    ${result}    Results: 0% dropped