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
23 [Teardown] Report_Failure_Due_To_Bug 6917
26 [Documentation] Iterate on add and delete flow until alien ID is found in Operational Datastore.
27 Run Keyword And Continue On Failure Add Flow f20.xml
28 Run Keyword And Continue On Failure Add Flow f21.xml
29 Run Keyword And Continue On Failure Add Flow f22.xml
30 Run Keyword And Continue On Failure Add Flow f23.xml
31 [Teardown] Report_Failure_Due_To_Bug 6917
35 [Documentation] Starts mininet and verify if topology is in operational datastore.
36 ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller
37 BuiltIn.Set Suite Variable ${mininet_conn_id}
38 RequestsLibrary.Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
39 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Switches In Topology 1
42 [Documentation] Stops mininet.
43 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
44 RequestsLibrary.Delete All Sessions
47 [Arguments] ${flowfile}
48 [Documentation] Add a Delete a Flow and verify presence in Datastore. The 5 sec sleep is required to reproduce the bug.
49 FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
50 FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data}
51 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Operational Flow ${True} ${data}
52 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Datastore Presence ${flowfile} ${True} ${True}
54 FlowLib.Delete Flow Via Restconf ${switch_idx} ${table_id} ${flow_id}
55 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Operational Flow ${False} ${data}
56 FlowLib.Check Datastore Presence ${flowfile} ${False} ${False} ${True}
58 [Teardown] BuiltIn.Run Keyword And Ignore Error FlowLib.Delete Flow Via Restconf ${switch_idx} ${table_id} ${flow_id}
61 [Arguments] ${flowfile}
62 [Documentation] Add a Delete a Flow and verify presence in Datastore. The 5 sec sleep is required to reproduce the bug.
63 FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
64 FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data}
65 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Operational Flow ${True} ${data}
66 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Datastore Presence ${flowfile} ${True} ${True}
69 [Teardown] BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${CONFIG_NODES_API}