a083de406643ece918fe503dfc1c7e78bd3dd9a0
[integration/test.git] / test / csit / suites / l2switch / Address_Tracking_OF13 / 010__restconf_inv_addresses.txt
1 *** Settings ***
2 Documentation     Test suite for AddressObservations in RESTCONF inventory
3 Suite Setup       Create Session   session   http://${CONTROLLER}:${PORT}   auth=${AUTH}   headers=${HEADERS_XML}
4 Suite Teardown    Delete All Sessions
5 Library           SSHLibrary
6 Library           Collections
7 Library           ../../../libraries/RequestsLibrary.py
8 Library           ../../../libraries/Common.py
9 Variables         ../../../variables/Variables.py
10
11 *** Variables ***
12 ${REST_CONTEXT}    /restconf/operational/opendaylight-inventory:nodes
13 ${IP_1}           "10.0.0.1"
14 ${IP_2}           "10.0.0.2"
15 ${IP_3}           "10.0.0.3"
16
17 *** Test Cases ***
18 Get list of nodes
19     [Documentation]    Get the inventory, should not contain address observations
20         ${resp}    Get    session    ${REST_CONTEXT}
21         Should Be Equal As Strings    ${resp.status_code}    200
22         Should Contain     ${resp.content}      openflow:1
23         Should Contain     ${resp.content}      openflow:2
24         Should Contain     ${resp.content}      openflow:3
25         Should Contain X Times    ${resp.content}   forwarding  4
26         Should Not Contain    ${resp.content}    ${IP_1}
27         Should Not Contain    ${resp.content}    ${IP_2}
28         Should Not Contain    ${resp.content}    ${IP_3}
29
30 Ping All
31     [Documentation]    Pingall, verify no packet loss
32         Write   pingall
33         ${result}    Read Until         mininet>
34         Should Contain   ${result}   0% dropped
35         Should Not Contain    ${result}    X
36         Sleep   3 
37
38 Get node 1 addresses
39     [Documentation]    Get the address observations for node 1
40         ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:1
41         Should Be Equal As Strings   ${resp.status_code}    200
42         Should Contain     ${resp.content}      openflow:1:1
43         Should Contain     ${resp.content}      openflow:1:2
44         Should Contain     ${resp.content}      addresses
45         Should Contain X Times    ${resp.content}   ${IP_1}  1
46         Should Not Contain    ${resp.content}    ${IP_2}
47         Should Not Contain    ${resp.content}    ${IP_3}
48
49 Get node 2 addresses
50     [Documentation]    Get the address observations for node 2
51         ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:2
52         Should Be Equal As Strings   ${resp.status_code}    200
53         Should Contain     ${resp.content}      openflow:2:1
54         Should Contain     ${resp.content}      openflow:2:2
55         Should Contain     ${resp.content}      openflow:2:3
56         Should Contain     ${resp.content}      addresses
57         Should Not Contain    ${resp.content}    ${IP_1}
58         Should Contain X Times    ${resp.content}   ${IP_2}  1
59         Should Not Contain    ${resp.content}    ${IP_3}
60
61 Get node 3 addresses
62     [Documentation]    Get the address observations for node 3
63         ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:3
64         Should Be Equal As Strings   ${resp.status_code}    200
65         Should Contain     ${resp.content}      openflow:3:1
66         Should Contain     ${resp.content}      openflow:3:2
67         Should Contain     ${resp.content}      addresses
68         Should Not Contain    ${resp.content}    ${IP_1}
69         Should Not Contain    ${resp.content}    ${IP_2}
70         Should Contain X Times    ${resp.content}   ${IP_3}  1