GIT restructure - Adding project folders and features
[integration/test.git] / test / csit / suites / controller / MD_SAL_NSF_OF13 / 010__restconf_inventory.txt
1 *** Settings ***
2 Documentation     Test suite for RESTCONF inventory
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 Resource          ../../../libraries/Utils.txt
10
11 *** Variables ***
12 ${REST_CONTEXT}    /restconf/operational/opendaylight-inventory:nodes
13 @{node_list}      openflow:1    openflow:2    openflow:3
14
15 *** Test Cases ***
16 Get list of nodes
17     [Documentation]    Get the inventory
18     ${resp}    RequestsLibrary.Get    session    ${REST_CONTEXT}
19     Wait Until Keyword Succeeds    30s    2s    Ensure All Nodes Are In Response    ${REST_CONTEXT}    ${node_list}
20
21 Get nodeconnector for a node 1
22     [Documentation]    Get the inventory for a node
23     ${resp}    RequestsLibrary.Get    session    ${REST_CONTEXT}/node/openflow:1
24     Should Be Equal As Strings    ${resp.status_code}    200
25     Should Contain    ${resp.content}    openflow:1:1
26     Should Contain    ${resp.content}    openflow:1:2
27
28 Get nodeconnector for a node 2
29     [Documentation]    Get the inventory for a node
30     ${resp}    RequestsLibrary.Get    session    ${REST_CONTEXT}/node/openflow:2
31     Should Be Equal As Strings    ${resp.status_code}    200
32     Should Contain    ${resp.content}    openflow:2:1
33     Should Contain    ${resp.content}    openflow:2:2
34     Should Contain    ${resp.content}    openflow:2:3
35
36 Get nodeconnector for a node 3
37     [Documentation]    Get the inventory for a node
38     ${resp}    RequestsLibrary.Get    session    ${REST_CONTEXT}/node/openflow:3
39     Should Be Equal As Strings    ${resp.status_code}    200
40     Should Contain    ${resp.content}    openflow:3:1
41     Should Contain    ${resp.content}    openflow:3:2
42     Should Contain    ${resp.content}    openflow:3:3