2 Documentation Test suite for bug 6917 validation.
3 Suite Setup Initialization Phase
4 Suite Teardown Final Phase
6 Library RequestsLibrary
7 Resource ../../../libraries/MininetKeywords.robot
8 Resource ../../../libraries/FlowLib.robot
9 Resource ../../../variables/Variables.robot
12 ${XmlsDir} ${CURDIR}/../../../variables/xmls
14 ${switch_name} s${switch_idx}
19 [Documentation] Iterate on add and delete flow until alien ID is found in Operational Datastore.
20 : FOR ${i} IN RANGE ${iteration}
21 \ Run Keyword And Continue On Failure Add And Delete Flow f21.xml
22 [Teardown] Report_Failure_Due_To_Bug 6917
25 [Documentation] Iterate on add and delete flow until alien ID is found in Operational Datastore.
26 Run Keyword And Continue On Failure Add Flow f20.xml
27 Run Keyword And Continue On Failure Add Flow f21.xml
28 Run Keyword And Continue On Failure Add Flow f22.xml
29 Run Keyword And Continue On Failure Add Flow f23.xml
30 [Teardown] Report_Failure_Due_To_Bug 6917
34 [Documentation] Starts mininet and verify if topology is in operational datastore.
35 ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller
36 BuiltIn.Set Suite Variable ${mininet_conn_id}
37 RequestsLibrary.Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
38 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Switches In Topology 1
41 [Documentation] Stops mininet.
42 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
43 RequestsLibrary.Delete All Sessions
46 [Arguments] ${flowfile}
47 [Documentation] Add a Delete a Flow and verify presence in Datastore. The 5 sec sleep is required to reproduce the bug.
48 FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
49 FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data}
50 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Operational Flow ${True} ${data}
51 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Datastore Presence ${flowfile} ${True} ${True}
53 FlowLib.Delete Flow Via Restconf ${switch_idx} ${table_id} ${flow_id}
54 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Operational Flow ${False} ${data}
55 FlowLib.Check Datastore Presence ${flowfile} ${False} ${False} ${True}
57 [Teardown] BuiltIn.Run Keyword And Ignore Error FlowLib.Delete Flow Via Restconf ${switch_idx} ${table_id} ${flow_id}
60 [Arguments] ${flowfile}
61 [Documentation] Add a Delete a Flow and verify presence in Datastore. The 5 sec sleep is required to reproduce the bug.
62 FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
63 FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data}
64 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Operational Flow ${True} ${data}
65 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Datastore Presence ${flowfile} ${True} ${True}
68 [Teardown] BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${CONFIG_NODES_API}