X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Fsuites%2Fopenflowplugin%2FBug_Validation%2F7335.robot;h=7642b349354197cd2f7e9d08c68a3ae302e2421d;hb=HEAD;hp=72fd3485f0a052b7bd5b192239c69a397d04fb4d;hpb=a9cd87c3259947af52931bf92b202b9272ccfc24;p=integration%2Ftest.git diff --git a/csit/suites/openflowplugin/Bug_Validation/7335.robot b/csit/suites/openflowplugin/Bug_Validation/7335.robot index 72fd3485f0..7642b34935 100644 --- a/csit/suites/openflowplugin/Bug_Validation/7335.robot +++ b/csit/suites/openflowplugin/Bug_Validation/7335.robot @@ -1,53 +1,68 @@ *** Settings *** -Documentation Test suite for bug 6917 validation. -Suite Setup Initialization Phase -Suite Teardown Final Phase -Library XML -Library RequestsLibrary -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/FlowLib.robot -Resource ../../../variables/Variables.robot +Documentation Test suite for bug 6917 validation. + +Library XML +Library RequestsLibrary +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/FlowLib.robot +Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Initialization Phase +Suite Teardown Final Phase + *** Variables *** -${XmlsDir} ${CURDIR}/../../../variables/xmls -${flowfile1} f162.xml -${flowfile2} f163.xml -${switch_idx} 1 -${switch_name} s${switch_idx} +${XmlsDir} ${CURDIR}/../../../variables/xmls +${flowfile1} f162.xml +${flowfile2} f163.xml +${switch_idx} 1 +${switch_name} s${switch_idx} + *** Test Cases *** Add Flow And Check It Is In Operational DS [Documentation] Add flow match IP and Ethertype IP FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile1} FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data} - BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Datastore Presence ${flowfile1} ${True} ${True} - ... ${False} ${True} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... FlowLib.Check Datastore Presence + ... ${flowfile1} + ... ${True} + ... ${True} + ... ${False} + ... ${True} Update Flow With Invalid Match And Check It Is Not In Operational DS [Documentation] Update flow removing Ethertype, this should remove flow from switch and operational DS FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile2} FlowLib.Update Flow Via Restconf ${switch_idx} ${table_id} ${flow_id} ${data} FlowLib.Check Config Flow ${True} ${data} - BuiltIn.Wait Until Keyword Succeeds 10s 1s Utils.No Content From URI session ${OPERATIONAL_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... Utils.No Content From URI + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id}?content=nonconfig [Teardown] Report_Failure_Due_To_Bug 7335 + *** Keywords *** Initialization Phase [Documentation] Starts mininet and verify if topology is in operational datastore. ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller BuiltIn.Set Suite Variable ${mininet_conn_id} - RequestsLibrary.Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} - BuiltIn.Wait Until Keyword Succeeds 10s 1s Are Switches Connected Topo + RequestsLibrary.Create Session + ... session + ... http://${ODL_SYSTEM_IP}:${RESTCONFPORT} + ... auth=${AUTH} + ... headers=${HEADERS_XML} + BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Switches In Topology 1 Final Phase [Documentation] Stops mininet. - BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${CONFIG_NODES_API} + BuiltIn.Run Keyword And Ignore Error RequestsLibrary.DELETE On Session session url=${RFC8040_NODES_API} MininetKeywords.Stop Mininet And Exit ${mininet_conn_id} RequestsLibrary.Delete All Sessions - -Are Switches Connected Topo - [Documentation] Checks wheather switches are connected to controller - ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML} - Log ${resp.content} - ${count}= XML.Get Element Count ${resp.content} xpath=node - BuiltIn.Should Be Equal As Numbers ${count} 1