2 Documentation Setup/teardown for GBPSFC 6-node topology
5 Library RequestsLibrary
6 Resource ../../../../libraries/Utils.robot
7 Resource ../../../../libraries/GBP/ConnUtils.robot
8 Resource Variables.robot
9 Variables ../../../../variables/Variables.py
11 Suite Setup Setup Everything
12 Suite Teardown Teardown Everything
21 [Documentation] Initial setup of remote VM. Copying of scripts and installation python packages to virtual env if missing.
22 Create Session session http://${ODL}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
23 Wait Until Keyword Succeeds
28 ... ${OF_OVERLAY_CONFIG_PATH}
29 ... headers=${headers}
31 FOR ${GBPSFC} IN @{GBPSFCs}
32 ConnUtils.Connect and Login ${GBPSFC} timeout=${timeout}
33 # TODO if something extra needs to be installed, please do it in virt-env
34 ${stderr} SSHLibrary.Execute Command
35 ... virtualenv --system-site-packages ${VE_DIR}
36 ... return_stdout=False
37 ... return_stderr=True
39 Should Be Empty ${stderr}
41 ... ${CURDIR}/../../common_scripts/*
42 ... ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/
44 ${stdout} ${stderr} ${rc} ConnUtils.Execute in VE
45 ... pip freeze | grep ipaddr -q || pip install ipaddr
46 ... timeout=${timeout}
47 Should Be Equal As Numbers ${rc} 0
48 SSHLibrary.Close Connection
53 [Documentation] Clearing remote VM - removing copied scripts.
54 Log stop_suite_in_6_node
55 FOR ${GBPSFC} IN @{GBPSFCs}
56 ConnUtils.Connect and Login ${GBPSFC} timeout=${timeout}
57 SSHLibrary.Execute Command sudo rm -rf ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}
58 SSHLibrary.Close Connection