X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Fsuites%2Fopenflowplugin%2FInventory_Scalability_OF10%2F010__restconf_inventory.robot;h=d0146177f6517708e9f580e5019c7926dadbb7f5;hb=HEAD;hp=47ab13cea001a72ba8049f004e78c6d952dd33b4;hpb=94651ca9711d8eb316721775561e815830bc6c7e;p=integration%2Ftest.git diff --git a/csit/suites/openflowplugin/Inventory_Scalability_OF10/010__restconf_inventory.robot b/csit/suites/openflowplugin/Inventory_Scalability_OF10/010__restconf_inventory.robot index 47ab13cea0..d0146177f6 100644 --- a/csit/suites/openflowplugin/Inventory_Scalability_OF10/010__restconf_inventory.robot +++ b/csit/suites/openflowplugin/Inventory_Scalability_OF10/010__restconf_inventory.robot @@ -1,14 +1,15 @@ *** Settings *** -Documentation Test suite for RESTCONF inventory -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library Collections -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py +Documentation Test suite for RESTCONF inventory + +Library Collections +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions -*** Variables *** -${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes *** Test Cases *** Get list of nodes @@ -21,10 +22,12 @@ Get list of nodes Get nodeconnector for the root node [Documentation] Get the inventory for the root node ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:1 - Log ${resp.content} - Should Be Equal As Strings ${resp.status_code} 200 - Wait Until Keyword Succeeds 30s 2s Check conn loop ${TOPO_TREE_FANOUT} 1 ${resp.content} + ${resp} RequestsLibrary.GET On Session + ... session + ... url=${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT} + ... expected_status=200 + Log ${resp.text} + Wait Until Keyword Succeeds 30s 2s Check conn loop ${TOPO_TREE_FANOUT} 1 ${resp.text} Get nodeconnector for a node [Documentation] Get the inventory for a node @@ -40,32 +43,36 @@ Get Stats for a node ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} Wait Until Keyword Succeeds 120s 2s Check Every Nodes Stats ${numnodes} + *** Keywords *** Check Every Nodes [Arguments] ${numnodes} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT} - Should Be Equal As Strings ${resp.status_code} 200 + ${resp} RequestsLibrary.GET On Session session url=${RFC8040_OPERATIONAL_NODES_API} expected_status=200 FOR ${IND} IN RANGE 1 ${numnodes+1} - Should Contain ${resp.content} openflow:${IND} + Should Contain ${resp.text} openflow:${IND} END Check Every Nodes Stats [Arguments] ${numnodes} FOR ${IND} IN RANGE 1 ${numnodes+1} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND} - Log ${resp.content} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} flow-capable-node-connector-statistics - Should Contain ${resp.content} flow-table-statistics + ${resp} RequestsLibrary.GET On Session + ... session + ... url=${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} + ... expected_status=200 + Log ${resp.text} + Should Contain ${resp.text} flow-capable-node-connector-statistics + Should Contain ${resp.text} flow-table-statistics END Check Every Nodes Nodeconnector [Arguments] ${numnodes} FOR ${IND} IN RANGE 2 ${numnodes+1} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND} - Log ${resp.content} - Should Be Equal As Strings ${resp.status_code} 200 - Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.content} + ${resp} RequestsLibrary.GET On Session + ... session + ... url=${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} + ... expected_status=200 + Log ${resp.text} + Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.text} END Check conn loop