Fixing mininet reads so that we always clear mininet
[integration/test.git] / test / csit / suites / base-of13 / 040__AD_SAL_NSF_OF13 / 040__flow_programmer.txt
index 023b14f81a23098e30dc7572ee00d5bf1115c286..e4fac2a8775dee1362dcd5b929e1e4e3678e0b11 100644 (file)
@@ -1,6 +1,6 @@
 *** Settings ***
 Documentation     Test suite for Flow Programmer
-Suite Setup       Create Session   session   http://${CONTROLLER}:8080  auth=${AUTH}   headers=${HEADERS}
+Suite Setup       Create Session   session   http://${CONTROLLER}:${RESTPORT}  auth=${AUTH}   headers=${HEADERS}
 Suite Teardown    Delete All Sessions
 Library           Collections
 Library           ../../../libraries/RequestsLibrary.py
@@ -10,7 +10,7 @@ Variables         ../../../variables/Variables.py
 *** Variables ***
 ${name}           flow1
 ${key}            flowConfig
-${node_id}        openflow:2
+${node_id}        00:00:00:00:00:00:00:02
 ${REST_CONTEXT}    /controller/nb/v2/flowprogrammer
 ${REST_CONTEXT_ST}    /controller/nb/v2/statistics
 ${FLOW}           "10.0.0.1"
@@ -19,12 +19,12 @@ ${FLOW}           "10.0.0.1"
 Add a flow
     [Documentation]    Add a flow, list to validate the result.
     [Tags]    add
-    ${node}    Create Dictionary    type    MD_SAL    id    ${node_id}
-    ${actions}    Create List    OUTPUT=openflow:2:1
+    ${node}    Create Dictionary    type    OF    id    ${node_id}
+    ${actions}    Create List    OUTPUT=1
     ${body}    Create Dictionary    name    ${name}    installInHw    true    node
     ...    ${node}    priority    1    etherType    0x800    nwDst
     ...    10.0.0.1/32    actions    ${actions}
-    ${resp}    Put    session    ${REST_CONTEXT}/${CONTAINER}/node/MD_SAL/${node_id}/staticFlow/${name}    data=${body}
+    ${resp}    Put    session    ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name}    data=${body}
     Should Be Equal As Strings    ${resp.status_code}    201
     ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}
     Should Be Equal As Strings    ${resp.status_code}    200
@@ -32,9 +32,9 @@ Add a flow
     ${content}    Get From Dictionary    ${result}    ${key}
     List Should Contain Value    ${content}    ${body}
 Check flow in flow stats
-   [Documentation]    Show flow stats and validate result
-    [Tags]    get
-    Sleep      30
+    [Documentation]    Show flow stats and validate result
+    [Tags]   get
+    Sleep   30
     ${resp}    Get    session    ${REST_CONTEXT_ST}/${CONTAINER}/flow
     Should Be Equal As Strings    ${resp.status_code}    200 
     Log    ${resp.content}
@@ -42,12 +42,12 @@ Check flow in flow stats
 Remove a flow
     [Documentation]    Remove a flow, list to validate the result.
     [Tags]    remove
-    ${node}    Create Dictionary    type    MD_SAL    id    ${node_id}
-    ${actions}    Create List    OUTPUT=openflow:2:1
+    ${node}    Create Dictionary    type    OF    id    ${node_id}
+    ${actions}    Create List    OUTPUT=1
     ${body}    Create Dictionary    name    ${name}    installInHw    true    node
     ...    ${node}    priority    1    etherType    0x800    nwDst
     ...    10.0.0.1/32    actions    ${actions}
-    ${resp}    Delete    session    ${REST_CONTEXT}/${CONTAINER}/node/MD_SAL/${node_id}/staticFlow/${name}
+    ${resp}    Delete    session    ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name}
     Should Be Equal As Strings    ${resp.status_code}    204
     ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}
     Should Be Equal As Strings    ${resp.status_code}    200
@@ -57,8 +57,9 @@ Remove a flow
 Check flow is not in flow stats
     [Documentation]    Show flow stats and validate result
     [Tags]    get
-    Sleep      30
+    Sleep   30
     ${resp}    Get    session    ${REST_CONTEXT_ST}/${CONTAINER}/flow
-    Should Be Equal As Strings    ${resp.status_code}    200  
+    Should Be Equal As Strings    ${resp.status_code}    200 
     Log    ${resp.content}
     Should Not Contain    ${resp.content}    ${FLOW}
+