From: Luis Gomez Date: Sat, 18 Apr 2015 14:45:31 +0000 (-0700) Subject: Scalability Test - To start Playing X-Git-Tag: release/lithium~134^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=commitdiff_plain;h=b4cbd98741d70883304979dc097494a30b498418 Scalability Test - To start Playing Change-Id: I87e1798abae93ee582032e2cc6a51107f16fdb07 Signed-off-by: Luis Gomez --- diff --git a/test/csit/libraries/Scalability.txt b/test/csit/libraries/Scalability.txt new file mode 100644 index 0000000000..68f18d89c5 --- /dev/null +++ b/test/csit/libraries/Scalability.txt @@ -0,0 +1,96 @@ +*** Settings *** +Library SSHLibrary + +*** Variables *** +${linux_prompt} > + +*** Keywords *** +Find Max Switches + [Arguments] ${start} ${stop} ${step} + [Documentation] Will find out max switches starting from ${start} till reaching ${stop} and in steps defined by ${step} + ${max-switches} Set Variable ${1} + ${start} Convert to Integer ${start} + ${stop} Convert to Integer ${stop} + ${step} Convert to Integer ${step} + : FOR ${switches} IN RANGE ${start} ${stop+1} ${step} + \ Start Mininet Linear ${switches} + \ ${status} ${result} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 2s + \ ... Check Every Switch ${switches} + \ Return From Keyword If '${status}' == 'FAIL' + \ ${status} ${result} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 2s + \ ... Check Linear Topology ${switches} + \ Return From Keyword If '${status}' == 'FAIL' + \ Stop Mininet + \ ${status} ${result} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 2s + \ ... Check No Switches ${switches} + \ Return From Keyword If '${status}' == 'FAIL' + \ ${status} ${result} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 2s + \ ... Check No Topology ${switches} + \ Return From Keyword If '${status}' == 'FAIL' + \ ${max-switches} Convert To String ${switches} + [Return] ${max-switches} + +Start Mininet Linear + [Arguments] ${switches} + [Documentation] Start mininet linear topology with ${switches} nodes + Log Start mininet linear ${switches} + ${mininet_conn_id}= Open Connection ${MININET} prompt=${linux_prompt} timeout=${switches*2} + Set Suite Variable ${mininet_conn_id} + Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any + Write sudo mn --controller=remote,ip=${CONTROLLER} --topo linear,${switches} --switch ovsk,protocols=OpenFlow13 + Read Until mininet> + Sleep 6 + +Check Every Switch + [Arguments] ${switches} + [Documentation] Check all switches and stats in operational inventory + : FOR ${switch} IN RANGE 1 ${switches+1} + \ ${resp} RequestsLibrary.Get session /restconf/operational/opendaylight-inventory:nodes/node/openflow:${switch} + \ Log ${resp.content} + \ Should Be Equal As Strings ${resp.status_code} 200 + \ Should Contain ${resp.content} flow-capable-node-connector-statistics + \ Should Contain ${resp.content} flow-table-statistics + +Check Linear Topology + [Arguments] ${switches} + [Documentation] Check Linear topology given ${switches} + ${resp} RequestsLibrary.Get session /restconf/operational/network-topology:network-topology/ + Log ${resp.content} + Should Be Equal As Strings ${resp.status_code} 200 + : FOR ${switch} IN RANGE 1 ${switches+1} + \ Should Contain ${resp.content} "node-id":"openflow:${switch}" + \ Should Contain ${resp.content} "tp-id":"openflow:${switch}:1" + \ Should Contain ${resp.content} "tp-id":"openflow:${switch}:2" + \ Should Contain ${resp.content} "source-tp":"openflow:${switch}:2" + \ Should Contain ${resp.content} "dest-tp":"openflow:${switch}:2" + \ ${edge} Evaluate ${switch}==1 or ${switch}==${switches} + \ Run Keyword Unless ${edge} Should Contain ${resp.content} "tp-id":"openflow:${switch}:3" + \ Run Keyword Unless ${edge} Should Contain ${resp.content} "source-tp":"openflow:${switch}:3" + \ Run Keyword Unless ${edge} Should Contain ${resp.content} "dest-tp":"openflow:${switch}:3" + +Check No Switches + [Arguments] ${switches} + [Documentation] Check no switch is in inventory + ${resp} RequestsLibrary.Get session /restconf/operational/opendaylight-inventory:nodes + Log ${resp.content} + Should Be Equal As Strings ${resp.status_code} 200 + : FOR ${switch} IN RANGE 1 ${switches+1} + \ Should Not Contain ${resp.content} openflow:${switch} + +Check No Topology + [Arguments] ${switches} + [Documentation] Check no switch is in topology + ${resp} RequestsLibrary.Get session /restconf/operational/network-topology:network-topology/ + Log ${resp.content} + Should Be Equal As Strings ${resp.status_code} 200 + : FOR ${switch} IN RANGE 1 ${switches+1} + \ Should Not Contain ${resp.content} openflow:${switch} + +Stop Mininet + [Documentation] Stop mininet + Log Stop Mininet + Switch Connection ${mininet_conn_id} + Read + Write exit + Read Until ${linux_prompt} + Close Connection diff --git a/test/csit/suites/openflowplugin/Maximum_Switches/010__finding_max_switches.txt b/test/csit/suites/openflowplugin/Maximum_Switches/010__finding_max_switches.txt new file mode 100644 index 0000000000..21c13b7b64 --- /dev/null +++ b/test/csit/suites/openflowplugin/Maximum_Switches/010__finding_max_switches.txt @@ -0,0 +1,22 @@ +*** Settings *** +Documentation Test suite for finding out max number of switches +Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions +Library OperatingSystem +Library ../../../libraries/RequestsLibrary.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/Scalability.txt + +*** Variables *** +${MIN_SWITCHES} 100 +${MAX_SWITCHES} 500 +${STEP_SWITCHES} 100 +${SWITCHES_RESULT_FILE} switches.csv + +*** Test Cases *** +Find Max Switches + [Documentation] Find max number of switches starting from ${MIN_SWITCHES} till reaching ${MAX_SWITCHES} in steps of ${STEP_SWITCHES} + Append To File ${SWITCHES_RESULT_FILE} Max Switches Linear Topo\n + ${max-switches} Find Max Switches ${MIN_SWITCHES} ${MAX_SWITCHES} ${STEP_SWITCHES} + Log ${max-switches} + Append To File ${SWITCHES_RESULT_FILE} ${max-switches}\n diff --git a/test/csit/testplans/openflowplugin-scalability-daily.txt b/test/csit/testplans/openflowplugin-scalability-daily.txt new file mode 100644 index 0000000000..2761e3d01e --- /dev/null +++ b/test/csit/testplans/openflowplugin-scalability-daily.txt @@ -0,0 +1,2 @@ +# Place the suites in run order: +integration/test/csit/suites/openflowplugin/Maximum_Switches