2 Documentation Test suite for bug 6917 validation.
5 Library RequestsLibrary
6 Resource ../../../libraries/MininetKeywords.robot
7 Resource ../../../libraries/FlowLib.robot
8 Resource ../../../variables/Variables.robot
9 Resource ../../../variables/openflowplugin/Variables.robot
11 Suite Setup Initialization Phase
12 Suite Teardown Final Phase
16 ${XmlsDir} ${CURDIR}/../../../variables/xmls
18 ${switch_name} s${switch_idx}
24 [Documentation] Iterate on add and delete flow until alien ID is found in Operational Datastore.
25 FOR ${i} IN RANGE ${iteration}
26 Run Keyword And Continue On Failure Add And Delete Flow f21.xml
28 [Teardown] Report_Failure_Due_To_Bug 6917
31 [Documentation] Iterate on add and delete flow until alien ID is found in Operational Datastore.
32 Run Keyword And Continue On Failure Add Flow f20.xml
33 Run Keyword And Continue On Failure Add Flow f21.xml
34 Run Keyword And Continue On Failure Add Flow f22.xml
35 Run Keyword And Continue On Failure Add Flow f23.xml
36 [Teardown] Report_Failure_Due_To_Bug 6917
41 [Documentation] Starts mininet and verify if topology is in operational datastore.
42 ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller
43 BuiltIn.Set Suite Variable ${mininet_conn_id}
44 RequestsLibrary.Create Session
46 ... http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
48 ... headers=${HEADERS_XML}
49 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Switches In Topology 1
52 [Documentation] Stops mininet.
53 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
54 RequestsLibrary.Delete All Sessions
57 [Documentation] Add a Delete a Flow and verify presence in Datastore. The 5 sec sleep is required to reproduce the bug.
58 [Arguments] ${flowfile}
59 FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
60 FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data}
61 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Operational Flow ${True} ${data}
62 BuiltIn.Wait Until Keyword Succeeds
65 ... FlowLib.Check Datastore Presence
71 FlowLib.Delete Flow Via Restconf ${switch_idx} ${table_id} ${flow_id}
72 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Operational Flow ${False} ${data}
73 FlowLib.Check Datastore Presence ${flowfile} ${False} ${False} ${True}
75 [Teardown] BuiltIn.Run Keyword And Ignore Error FlowLib.Delete Flow Via Restconf ${switch_idx} ${table_id} ${flow_id}
78 [Documentation] Add a Delete a Flow and verify presence in Datastore. The 5 sec sleep is required to reproduce the bug.
79 [Arguments] ${flowfile}
80 FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
81 FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data}
82 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Operational Flow ${True} ${data}
83 BuiltIn.Wait Until Keyword Succeeds
86 ... FlowLib.Check Datastore Presence
93 [Teardown] BuiltIn.Run Keyword And Ignore Error RequestsLibrary.DELETE On Session session url=${RFC8040_NODES_API}