Replace Bierman02 with RFC8040 for OpenFlow Plugin
[integration/test.git] / csit / suites / openflowplugin / MD_SAL_NSF_OF13 / 040_restconf_frm.robot
index 7e3ae087cf90008d47e5cc40778f4ecb1add3ec1..d7ecf80ffc5a3934a5705adc291122fede81fbf0 100644 (file)
@@ -7,6 +7,7 @@ Library           RequestsLibrary
 Library           ../../../libraries/Common.py
 Variables         ../../../variables/Variables.py
 Resource          ../../../libraries/Utils.robot
+Resource          ../../../variables/openflowplugin/Variables.robot
 
 *** Variables ***
 ${BODY1}          <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.10.1/32</ipv4-destination></match><id>139</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><dec-nw-ttl/></action></apply-actions></instruction></instructions></flow>
@@ -15,48 +16,48 @@ ${BODY2}          <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</pri
 *** Test Cases ***
 Add a flow - Sending IPv4 Dest Address and Eth type
     [Documentation]    Push a flow through REST-API
-    ${resp}    RequestsLibrary.Put Request    session    ${CONFIG_NODES_API}/node/openflow:1/table/2/flow/139    headers=${HEADERS_XML}    data=${BODY1}
+    ${resp}    RequestsLibrary.Put Request    session    ${RFC8040_NODES_API}/node=openflow%3A1/table=2/flow=139    headers=${HEADERS_XML}    data=${BODY1}
     BuiltIn.Should_Match    "${resp.status_code}"    "20?"
 
 Verify after adding flow config - Sending IPv4 Dest Address and Eth type
     [Documentation]    Verify the flow
-    ${resp}    RequestsLibrary.Get Request    session    ${CONFIG_NODES_API}/node/openflow:1/table/2
+    ${resp}    RequestsLibrary.Get Request    session    ${RFC8040_NODES_API}/node=openflow%3A1/table=2?content=config
     Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.text}    139
 
 Verify after adding flow operational - Sending IPv4 Dest Address and Eth type
     [Documentation]    Verify the flow
     ${elements}=    Create List    10.0.10.1
-    Wait Until Keyword Succeeds    10s    2s    Check For Elements At URI    ${OPERATIONAL_NODES_API}/node/openflow:1/table/2/flow/139    ${elements}
+    Wait Until Keyword Succeeds    10s    2s    Check For Elements At URI    ${RFC8040_NODES_API}/node=openflow%3A1/table=2/flow=139?content=nonconfig    ${elements}
 
 Modify a flow - Output to physical port#
     [Documentation]    Push a flow through REST-API
-    ${resp}    RequestsLibrary.Put Request    session    ${CONFIG_NODES_API}/node/openflow:1/table/2/flow/139    headers=${HEADERS_XML}    data=${BODY2}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.Put Request    session    ${RFC8040_NODES_API}/node=openflow%3A1/table=2/flow=139    headers=${HEADERS_XML}    data=${BODY2}
+    Should Be Equal As Strings    ${resp.status_code}    204
 
 Verify after modifying flow config - Output to physical port#
     [Documentation]    Verify the flow
-    ${resp}    RequestsLibrary.Get Request    session    ${CONFIG_NODES_API}/node/openflow:1/table/2
+    ${resp}    RequestsLibrary.Get Request    session    ${RFC8040_NODES_API}/node=openflow%3A1/table=2?content=config
     Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.text}    10.0.20.1
 
 Verify after modifying flow operational - Output to physical port#
     [Documentation]    Verify the flow
     ${elements}=    Create List    10.0.20.1
-    Wait Until Keyword Succeeds    10s    2s    Check For Elements At URI    ${OPERATIONAL_NODES_API}/node/openflow:1/table/2/flow/139    ${elements}
+    Wait Until Keyword Succeeds    10s    2s    Check For Elements At URI    ${RFC8040_NODES_API}/node=openflow%3A1/table=2/flow=139?content=nonconfig    ${elements}
 
 Remove a flow - Output to physical port#
     [Documentation]    Remove a flow
-    ${resp}    RequestsLibrary.Delete Request    session    ${CONFIG_NODES_API}/node/openflow:1/table/2/flow/139
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.Delete Request    session    ${RFC8040_NODES_API}/node=openflow%3A1/table=2/flow=139
+    Should Be Equal As Strings    ${resp.status_code}    204
 
 Verify after deleting flow config - Output to physical port#
     [Documentation]    Verify the flow
-    ${resp}    RequestsLibrary.Get Request    session    ${CONFIG_NODES_API}/node/openflow:1/table/2
+    ${resp}    RequestsLibrary.Get Request    session    ${RFC8040_NODES_API}/node=openflow%3A1/table=2?content=config
     Should Be Equal As Strings    ${resp.status_code}    200
     Should Not Contain    ${resp.text}    139
 
 Verify after deleting flow operational - Output to physical port#
     [Documentation]    Verify the flow
     ${elements}=    Create List    10.0.20.1
-    Wait Until Keyword Succeeds    10s    2s    Check For Elements Not At URI    ${OPERATIONAL_NODES_API}/node/openflow:1/table/2    ${elements}
+    Wait Until Keyword Succeeds    10s    2s    Check For Elements Not At URI    ${RFC8040_NODES_API}/node=openflow%3A1/table=2?content=nonconfig    ${elements}