Update Robot Framework format - step 7
[integration/test.git] / csit / suites / groupbasedpolicy / GBPSFC / 6-node / __init__.robot
index 8ebb7c4d27923987ef50abb50c771b1292f3cd22..9c857801cf166be4729f462b9c2f14b822f83eb3 100644 (file)
@@ -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