X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Fsuites%2Fgroupbasedpolicy%2FGBPSFC%2F6-node%2F__init__.robot;h=9c857801cf166be4729f462b9c2f14b822f83eb3;hb=eb6f6620ee35cce6f31c0e0288934ef04f03dd78;hp=8ebb7c4d27923987ef50abb50c771b1292f3cd22;hpb=dd942881d4014c5e5b68cad168f11d610fc9ae39;p=integration%2Ftest.git diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/__init__.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/__init__.robot index 8ebb7c4d27..9c857801cf 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/__init__.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/__init__.robot @@ -1,38 +1,59 @@ *** Settings *** -Documentation Setup/teardown for GBPSFC 6-node topology -Suite Setup Setup Everything -Suite Teardown Teardown Everything -Library SSHLibrary -Library RequestsLibrary -Resource ../../../../libraries/Utils.robot -Resource ../../../../libraries/GBP/ConnUtils.robot -Resource Variables.robot -Variables ../../../../variables/Variables.py +Documentation Setup/teardown for GBPSFC 6-node topology + +Library SSHLibrary +Library RequestsLibrary +Resource ../../../../libraries/Utils.robot +Resource ../../../../libraries/GBP/ConnUtils.robot +Resource Variables.robot +Variables ../../../../variables/Variables.py + +Suite Setup Setup Everything +Suite Teardown Teardown Everything + *** Variables *** -${timeout} 10s +${timeout} 10s + *** Keywords *** Setup Everything [Documentation] Initial setup of remote VM. Copying of scripts and installation python packages to virtual env if missing. Create Session session http://${ODL}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS} - Wait Until Keyword Succeeds 10x 30 s Get Data From URI session ${OF_OVERLAY_CONFIG_PATH} headers=${headers} + Wait Until Keyword Succeeds + ... 10x + ... 30 s + ... Get Data From URI + ... session + ... ${OF_OVERLAY_CONFIG_PATH} + ... headers=${headers} Delete All Sessions - : FOR ${GBPSFC} IN @{GBPSFCs} - \ ConnUtils.Connect and Login ${GBPSFC} timeout=${timeout} - \ # TODO if something extra needs to be installed, please do it in virt-env - \ ${stderr} SSHLibrary.Execute Command virtualenv --system-site-packages ${VE_DIR} return_stdout=False return_stderr=True return_rc=False - \ Should Be Empty ${stderr} - \ SSHLibrary.Put File ${CURDIR}/../../common_scripts/* ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/ mode=0755 - \ ${stdout} ${stderr} ${rc} ConnUtils.Execute in VE pip freeze | grep ipaddr -q || pip install ipaddr timeout=${timeout} - \ Should Be Equal As Numbers ${rc} 0 - \ SSHLibrary.Close Connection + FOR ${GBPSFC} IN @{GBPSFCs} + ConnUtils.Connect and Login ${GBPSFC} timeout=${timeout} + # TODO if something extra needs to be installed, please do it in virt-env + ${stderr} SSHLibrary.Execute Command + ... virtualenv --system-site-packages ${VE_DIR} + ... return_stdout=False + ... return_stderr=True + ... return_rc=False + Should Be Empty ${stderr} + SSHLibrary.Put File + ... ${CURDIR}/../../common_scripts/* + ... ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/ + ... mode=0755 + ${stdout} ${stderr} ${rc} ConnUtils.Execute in VE + ... pip freeze | grep ipaddr -q || pip install ipaddr + ... timeout=${timeout} + Should Be Equal As Numbers ${rc} 0 + SSHLibrary.Close Connection + END Set ODL Variables Teardown Everything [Documentation] Clearing remote VM - removing copied scripts. Log stop_suite_in_6_node - : FOR ${GBPSFC} IN @{GBPSFCs} - \ ConnUtils.Connect and Login ${GBPSFC} timeout=${timeout} - \ SSHLibrary.Execute Command sudo rm -rf ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER} - \ SSHLibrary.Close Connection + FOR ${GBPSFC} IN @{GBPSFCs} + ConnUtils.Connect and Login ${GBPSFC} timeout=${timeout} + SSHLibrary.Execute Command sudo rm -rf ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER} + SSHLibrary.Close Connection + END