d510c46025ad2e28dcfe065e4f39d01fc8915be5
[integration/test.git] / test / csit / suites / base-of13 / 080__Inventory_Performance / 040__topology_manager.txt
1 *** Settings ***
2 Documentation     Test suite for Topology Manager
3 Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}   auth=${AUTH}   headers=${HEADERS}
4 Suite Teardown    Delete All Sessions
5 Library           Collections
6 Library           ../../../libraries/RequestsLibrary.py
7 Library           ../../../libraries/Common.py
8 Library           ../../../libraries/Topologynew.py
9 Variables         ../../../variables/Variables.py
10
11 *** Variables ***
12 ${nodeprefix}   openflow:
13 ${REST_CONTEXT}    /controller/nb/v2/topology
14
15 *** Test Cases ***
16 Get Topology
17     [Documentation]    Get Topology and validate the result.
18     [Tags]    get
19     ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}
20     Should Be Equal As Strings    ${resp.status_code}    200 
21     Log    ${resp.content}
22     ${TOPO_TREE_DEPTH}    Convert To Integer  ${TOPO_TREE_DEPTH}
23     ${TOPO_TREE_FANOUT}   Convert To Integer  ${TOPO_TREE_FANOUT}
24     Should Contain X Times  ${resp.content}   "00:00:00:00:00:00:00:01"   ${TOPO_TREE_FANOUT*2}
25     ${leaflist}    Get Ids Of Leaf Nodes    ${TOPO_TREE_FANOUT}   ${TOPO_TREE_DEPTH} 
26     ${topo_nodes}    Get Nodes From Tree Topo    (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})   1
27     :FOR    ${ITEM}  IN     @{topo_nodes}
28     \   ${IND}  Get From Dictionary    ${ITEM}    id
29     \   ${linkcnt}      Num Of Links For Node       ${IND}      ${leaflist}     ${TOPO_TREE_FANOUT}
30     \   Should Contain X Times  ${resp.content}     "${IND}"    ${linkcnt*2}   
31
32