*** Settings ***
-Documentation Suite checks if StatMngr is able to collect flows with gaussian spread over the switches and gaussian spread over tables within the switch
-Suite Setup Connect Switches
-Suite Teardown Stop Switches
-Library OperatingSystem
-Library Collections
-Library XML
-Library SSHLibrary
-Variables ../../../../csit/variables/Variables.py
-Library RequestsLibrary
-Library ../../../../csit/libraries/Common.py
-Library ../../../../csit/libraries/ScaleClient.py
+Documentation Suite checks if StatMngr is able to collect flows with gaussian spread over the switches and gaussian spread over tables within the switch
+
+Library OperatingSystem
+Library Collections
+Library XML
+Library SSHLibrary
+Library RequestsLibrary
+Library ../../../../csit/libraries/Common.py
+Library ../../../../csit/libraries/ScaleClient.py
+Variables ../../../../csit/variables/Variables.py
+Resource ../../../../csit/variables/openflowplugin/Variables.robot
+
+Suite Setup Connect Switches
+Suite Teardown Stop Switches
+
*** Variables ***
-${swnr} 17
-${flnr} 17000
-${swspread} gauss
-${tabspread} gauss
-${topourl} /restconf/operational/network-topology:network-topology/topology/flow:1
-${invurl} /restconf/operational/opendaylight-inventory:nodes
-@{cntls} ${ODL_SYSTEM_IP}
+${swnr} 17
+${flnr} 17000
+${swspread} gauss
+${tabspread} gauss
+@{cntls} ${ODL_SYSTEM_IP}
+
*** Test Cases ***
Configure Flows
- ${flows} ${notes}= Generate New Flow Details flows=${flnr} switches=${swnr} swspread=${swspread} tabspread=${tabspread}
+ ${flows} ${notes}= Generate New Flow Details
+ ... flows=${flnr}
+ ... switches=${swnr}
+ ... swspread=${swspread}
+ ... tabspread=${tabspread}
Log ${notes}
${res}= Configure Flows flow_details=${flows} controllers=@{cntls} nrthreads=5
Log ${res}
${noflows}= Create List
Wait Until Keyword Succeeds 110s 20s Check Flows Inventory ${noflows} ${ODL_SYSTEM_IP}
+
*** Keywords ***
Connect Switches
[Documentation] Starts mininet with requested number of switches (${swnr})
Log Starting mininet with ${swnr} switches
- Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=600
+ Open Connection ${TOOLS_SYSTEM_IP} prompt=${TOOLS_SYSTEM_PROMPT} timeout=600
Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
- Write sudo ovs-vsctl set-manager ptcp:6644
- Write sudo mn -c
- Read Until ${DEFAULT_LINUX_PROMPT}
+ Execute Command sudo ovs-vsctl set-manager ptcp:6644
+ Execute Command sudo mn -c
Write sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${swnr} --switch ovsk,protocols=OpenFlow13
Read Until mininet>
Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
Delete All Sessions
Read
Write exit
- Read Until ${DEFAULT_LINUX_PROMPT}
+ Read Until ${TOOLS_SYSTEM_PROMPT}
Close Connection
Are Switches Connected Topo
[Documentation] Checks wheather switches are connected to controller
- ${resp}= Get Request session /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML}
+ ${resp}= Get Request session ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} headers=${ACCEPT_XML}
Log ${resp.content}
${count}= Get Element Count ${resp.content} xpath=node
Should Be Equal As Numbers ${count} ${swnr}