${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
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
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
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
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}
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}
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