Upgrade RF syntax for v3.2 compatibility
[integration/test.git] / csit / suites / openflowplugin / Flows_Stats_OF13 / 010__SM_add_upd_del_flows.robot
index 5ef483eae23ea038283cff8c7369184d30a6a628..0569e32435c024ef73c45ab4020e781339d0a9f0 100644 (file)
@@ -15,16 +15,16 @@ ${XmlsDir}        ${CURDIR}/../../../variables/xmls
 ${switch_idx}     1
 ${switch_name}    s${switch_idx}
 @{xml_files}      f1.xml    f2.xml    f3.xml    f5.xml    f7.xml    f8.xml    f9.xml
-...               f10.xml    f11.xml    f12.xml    f13.xml    f14.xml    f17.xml    f19.xml
-...               f24.xml
+...               f10.xml    f11.xml    f14.xml    f17.xml    f19.xml    f24.xml
 
 *** Test Cases ***
 Test Add Flows
     [Documentation]    Add all flows and waits for SM to collect data
-    : FOR    ${flowfile}    IN    @{xml_files}
-    \    Log    ${flowfile}
-    \    Init Flow Variables    ${flowfile}
-    \    Run Keyword And Continue On Failure    Add Flow
+    FOR    ${flowfile}    IN    @{xml_files}
+        Log    ${flowfile}
+        Init Flow Variables    ${flowfile}
+        Run Keyword And Continue On Failure    Add Flow
+    END
 
 Test Is Flow 1 Added
     [Documentation]    Checks if flow is configured and operational
@@ -80,18 +80,6 @@ Test Is Flow 11 Added
     Check Config Flow    ${True}
     Check Operational Table    ${True}
 
-Test Is Flow 12 Added
-    [Documentation]    Checks if flow is configured and operational
-    Init Flow Variables    f12.xml
-    Check Config Flow    ${True}
-    Check Operational Table    ${True}
-
-Test Is Flow 13 Added
-    [Documentation]    Checks if flow is configured and operational
-    Init Flow Variables    f13.xml
-    Check Config Flow    ${True}
-    Check Operational Table    ${True}
-
 Test Is Flow 14 Added
     [Documentation]    Checks if flow is configured and operational
     Init Flow Variables    f14.xml
@@ -118,10 +106,11 @@ Test Is Flow 24 Added
 
 Test Delete Flows
     [Documentation]    Delete all flows and waits for SM to collect data
-    : FOR    ${flowfile}    IN    @{xml_files}
-    \    Log    ${flowfile}
-    \    Init Flow Variables    ${flowfile}
-    \    Run Keyword And Continue On Failure    Delete Flow
+    FOR    ${flowfile}    IN    @{xml_files}
+        Log    ${flowfile}
+        Init Flow Variables    ${flowfile}
+        Run Keyword And Continue On Failure    Delete Flow
+    END
 
 Test Is Flow 1 Deleted
     [Documentation]    Checks if flow is not configured and operational
@@ -177,18 +166,6 @@ Test Is Flow 11 Deleted
     Check Config Flow    ${False}
     Check Operational Table    ${False}
 
-Test Is Flow 12 Deleted
-    [Documentation]    Checks if flow is not configured and operational
-    Init Flow Variables    f12.xml
-    Check Config Flow    ${False}
-    Check Operational Table    ${False}
-
-Test Is Flow 13 Deleted
-    [Documentation]    Checks if flow is not configured and operational
-    Init Flow Variables    f13.xml
-    Check Config Flow    ${False}
-    Check Operational Table    ${False}
-
 Test Is Flow 14 Deleted
     [Documentation]    Checks if flow is not configured and operational
     Init Flow Variables    f14.xml
@@ -239,7 +216,7 @@ Check Config Flow Presence
 
 Flow Presence Config Flow
     ${headers}=    Create Dictionary    Accept=application/xml
-    ${resp}=    RequestsLibrary.Get    session    /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}    headers=${headers}
+    ${resp}=    RequestsLibrary.Get Request    session    /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}    headers=${headers}
     Log    ${resp}
     Log    ${resp.content}
     Return From Keyword If    ${resp.status_code}!=200    ${False}    ${EMPTY}
@@ -259,7 +236,7 @@ Check Operational Table Presence
 
 Flow Presence Operational Table
     ${headers}=    Create Dictionary    Accept=application/xml
-    ${resp}=    RequestsLibrary.Get    session    /restconf/operational/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}    headers=${headers}
+    ${resp}=    RequestsLibrary.Get Request    session    /restconf/operational/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}    headers=${headers}
     Log    ${resp}
     Log    ${resp.content}
     Return From Keyword If    ${resp.status_code}!=200    ${False}    ${EMPTY}
@@ -269,25 +246,26 @@ Flow Presence Operational Table
 
 Add Flow
     Log    ${data}
-    ${resp}=    RequestsLibrary.Put    session    /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}    headers=${HEADERS_XML}    data=${data}
+    ${resp}=    RequestsLibrary.Put Request    session    /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}    headers=${HEADERS_XML}    data=${data}
     ${msg}=    Set Variable    Adding flow for /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
     Should Be Equal As Strings    ${resp.status_code}    200    msg=${msg}
 
 Delete Flow
-    ${resp}=    RequestsLibrary.Delete    session    /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}
+    ${resp}=    RequestsLibrary.Delete Request    session    /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}
     ${msg}=    Set Variable    Delete flow for /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
     Should Be Equal As Strings    ${resp.status_code}    200    msg=${msg}
 
 Delete All Flows
     [Documentation]    Deletes all flows
-    : FOR    ${flowfile}    IN    @{xml_files}
-    \    Log    ${flowfile}
-    \    Init Flow Variables    ${flowfile}
-    \    Delete Flow
+    FOR    ${flowfile}    IN    @{xml_files}
+        Log    ${flowfile}
+        Init Flow Variables    ${flowfile}
+        Delete Flow
+    END
 
 Initialization Phase
     [Documentation]    Initiate tcp connection with controller
-    Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+    Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
 
 Teardown Phase
     [Documentation]    Closes tcp connection with controller and removes flows