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 Variables ../../../variables/Variables.py
12 ${XmlsDir} ${CURDIR}/../../../variables/xmls
15 ${switch_name} s${switch_idx}
18 Add Alien Flow And Verify It Is In Operational DS
19 [Documentation] Add flow with incorrent in-port format to generate alien ID
20 FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
21 FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data}
22 BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Datastore Presence ${flowfile} ${True} ${True}
24 [Teardown] Report_Failure_Due_To_Bug 7258
28 [Documentation] Starts mininet and verify if topology is in operational datastore.
29 ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller
30 BuiltIn.Set Suite Variable ${mininet_conn_id}
31 RequestsLibrary.Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
32 BuiltIn.Wait Until Keyword Succeeds 10s 1s Are Switches Connected Topo
35 [Documentation] Stops mininet.
36 BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${CONFIG_NODES_API}
37 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
38 RequestsLibrary.Delete All Sessions
40 Are Switches Connected Topo
41 [Documentation] Checks wheather switches are connected to controller
42 ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML}
44 ${count}= XML.Get Element Count ${resp.content} xpath=node
45 BuiltIn.Should Be Equal As Numbers ${count} 1