18d52aefe73b17a57039f8c89976de858f84303f
[integration/test.git] / test / csit / suites / l2switch / Loop_Removal_OF13 / 010__loop_of_3.robot
1 *** Settings ***
2 Documentation     Test suite for Ring/Loop topology of size 3
3 Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTCONFPORT}   auth=${AUTH}   headers=${HEADERS_XML}
4 Suite Teardown    Delete All Sessions
5 Library           Collections
6 Library           ../../../libraries/RequestsLibrary.py
7 Library           ../../../libraries/Common.py
8 Variables         ../../../variables/Variables.py
9
10 *** Variables ***
11 ${REST_CONTEXT}    /restconf/operational/opendaylight-inventory:nodes
12
13 *** Test Cases ***
14 Get opendaylight-inventory
15     [Documentation]    Get all nodes and all link states (forwarding/discarding)
16         ${resp}    Get    session    ${REST_CONTEXT}
17         Should Be Equal As Strings    ${resp.status_code}    200
18         Should Contain     ${resp.content}      openflow:1
19         Should Contain     ${resp.content}      openflow:2
20         Should Contain     ${resp.content}      openflow:3
21         Should Contain X Times    ${resp.content}   forwarding  4
22         Should Contain X Times    ${resp.content}   discarding  2
23
24 Get nodeconnectors for node 1
25     [Documentation]    Get the inventory for node 1
26         ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:1
27         Should Be Equal As Strings   ${resp.status_code}    200
28         Should Contain     ${resp.content}      openflow:1:1
29         Should Contain     ${resp.content}      openflow:1:2
30         Should Contain     ${resp.content}      openflow:1:3
31
32 Get nodeconnectors for node 2
33     [Documentation]    Get the inventory for node 2
34         ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:2
35         Should Be Equal As Strings   ${resp.status_code}    200
36         Should Contain     ${resp.content}      openflow:2:1
37         Should Contain     ${resp.content}      openflow:2:2
38         Should Contain     ${resp.content}      openflow:2:3
39
40 Get nodeconnectors for node 3
41     [Documentation]    Get the inventory for node 3
42         ${resp}    Get    session    ${REST_CONTEXT}/node/openflow:3
43         Should Be Equal As Strings   ${resp.status_code}    200
44         Should Contain     ${resp.content}      openflow:3:1
45         Should Contain     ${resp.content}      openflow:3:2
46         Should Contain     ${resp.content}      openflow:3:3
47