Fix python3 issues in OFP 2
[integration/test.git] / csit / suites / openflowplugin / Inventory_Scalability_OF10 / 010__restconf_inventory.robot
index 7c449abfef668a666f6f6c4ff241be6efc08f9e9..8e0d92787449b66607da70e4fa455f5b18bd7124 100644 (file)
@@ -21,10 +21,10 @@ 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    session    ${REST_CONTEXT}/node/openflow:1
-    Log    ${resp.content}
+    ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}/node/openflow:1
+    Log    ${resp.text}
     Should Be Equal As Strings    ${resp.status_code}    200
-    Wait Until Keyword Succeeds    30s    2s    Check conn loop    ${TOPO_TREE_FANOUT}    1    ${resp.content}
+    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
@@ -43,29 +43,33 @@ Get Stats for a node
 *** Keywords ***
 Check Every Nodes
     [Arguments]    ${numnodes}
-    ${resp}    RequestsLibrary.Get    session    ${REST_CONTEXT}
+    ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}
     Should Be Equal As Strings    ${resp.status_code}    200
-    : FOR    ${IND}    IN RANGE    1    ${numnodes+1}
-    \    Should Contain    ${resp.content}    openflow:${IND}
+    FOR    ${IND}    IN RANGE    1    ${numnodes+1}
+        Should Contain    ${resp.text}    openflow:${IND}
+    END
 
 Check Every Nodes Stats
     [Arguments]    ${numnodes}
-    : FOR    ${IND}    IN RANGE    1    ${numnodes+1}
-    \    ${resp}    RequestsLibrary.Get    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
+    FOR    ${IND}    IN RANGE    1    ${numnodes+1}
+        ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}/node/openflow:${IND}
+        Log    ${resp.text}
+        Should Be Equal As Strings    ${resp.status_code}    200
+        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    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}
+    FOR    ${IND}    IN RANGE    2    ${numnodes+1}
+        ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}/node/openflow:${IND}
+        Log    ${resp.text}
+        Should Be Equal As Strings    ${resp.status_code}    200
+        Check conn loop    ${TOPO_TREE_FANOUT+1}    ${IND}    ${resp.text}
+    END
 
 Check conn loop
     [Arguments]    ${arg}    ${outerind}    ${content}
-    : FOR    ${var}    IN RANGE    1    ${arg+1}
-    \    Should Contain    ${content}    openflow:${outerind}:${var}
+    FOR    ${var}    IN RANGE    1    ${arg+1}
+        Should Contain    ${content}    openflow:${outerind}:${var}
+    END