Add module to the augmented node in the URL path
[integration/test.git] / csit / suites / openflowplugin / Clustered_Reconciliation / 010_Group_Flows.robot
index 795d7d5c211839eea87a22a5372552c97a298739..9458cd99bf9236e049bfab18f18055af6d753add 100644 (file)
@@ -13,6 +13,7 @@ Resource          ../../../libraries/MininetKeywords.robot
 Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/OvsManager.robot
 Resource          ../../../variables/Variables.robot
+Resource          ../../../variables/openflowplugin/Variables.robot
 
 *** Variables ***
 ${SWITCHES}       3
@@ -375,7 +376,7 @@ Final Phase
     [Documentation]    Delete all sessions.
     ${command} =    BuiltIn.Set Variable    sudo iptables -v -F
     BuiltIn.Run Keyword And Ignore Error    ClusterManagement.Run_Bash_Command_On_List_Or_All    ${command}
-    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}
+    BuiltIn.Run Keyword And Ignore Error    RequestsLibrary.Delete Request    session    ${RFC8040_NODES_API}
     RequestsLibrary.Delete All Sessions
 
 Add Groups And Flows On Member
@@ -383,9 +384,10 @@ Add Groups And Flows On Member
     [Documentation]    Add ${ITER} groups type 1 & 2 and flows in every switch.
     ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
     FOR    ${switch}    IN RANGE    1    ${switches+1}
-        TemplatedRequests.Post As Json Templated    folder=${VAR_DIR}/add-group-1    mapping={"SWITCH":"${switch}"}    session=${session}    iterations=${iter}
-        TemplatedRequests.Post As Json Templated    folder=${VAR_DIR}/add-group-2    mapping={"SWITCH":"${switch}"}    session=${session}    iterations=${iter}
-        TemplatedRequests.Post As Json Templated    folder=${VAR_DIR}/add-flow    mapping={"SWITCH":"${switch}"}    session=${session}    iterations=${iter}
+        &{mapping}    BuiltIn.Create_Dictionary    NODE=openflow:${switch}
+        TemplatedRequests.Post As Json Templated    folder=${VAR_DIR}/add-group-1    mapping=${mapping}    session=${session}    iterations=${iter}
+        TemplatedRequests.Post As Json Templated    folder=${VAR_DIR}/add-group-2    mapping=${mapping}    session=${session}    iterations=${iter}
+        TemplatedRequests.Post As Json Templated    folder=${VAR_DIR}/add-flow    mapping=${mapping}    session=${session}    iterations=${iter}
     END
 
 Add Single Group And Flow On Member
@@ -398,9 +400,9 @@ Remove Single Group And Flow On Member
     [Documentation]    Remove 1 group 1&2 and 1 flow in every switch.
     ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
     FOR    ${switch}    IN RANGE    1    ${switches+1}
-        RequestsLibrary.Delete Request    ${session}    ${CONFIG_NODES_API}/node/openflow:${switch}/table/0/flow/1
-        RequestsLibrary.Delete Request    ${session}    ${CONFIG_NODES_API}/node/openflow:${switch}/group/1
-        RequestsLibrary.Delete Request    ${session}    ${CONFIG_NODES_API}/node/openflow:${switch}/group/1000
+        RequestsLibrary.Delete Request    ${session}    ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:table=0/flow=1
+        RequestsLibrary.Delete Request    ${session}    ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1
+        RequestsLibrary.Delete Request    ${session}    ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1000
     END
 
 Check Flow Stats Are Not Frozen
@@ -417,7 +419,7 @@ Extract Flow Duration
     [Arguments]    ${member_index}
     [Documentation]    Extract duration for flow 1 in switch 1.
     ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
-    ${resp}    RequestsLibrary.Get Request    ${session}    ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/flow/1    headers=${headers}
+    ${resp}    RequestsLibrary.Get Request    ${session}    ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=1?content=nonconfig    headers=${headers}
     Log    ${resp.content}
     ${json_resp} =    RequestsLibrary.To_Json    ${resp.content}
     ${flow_list} =    Collections.Get_From_Dictionary    ${json_resp}    flow-node-inventory:flow