Remove ODL_STREAM variable from usage in libraries/TopoprocessingKeywords.robot 75/50675/1
authorPeter Gubka <pgubka@cisco.com>
Thu, 19 Jan 2017 15:03:01 +0000 (16:03 +0100)
committerPeter Gubka <pgubka@cisco.com>
Thu, 19 Jan 2017 15:04:13 +0000 (16:04 +0100)
Change-Id: Ie202479ec81edb765e37bb4fa8a82ec7b8c78620
Signed-off-by: Peter Gubka <pgubka@cisco.com>
csit/libraries/TopoprocessingKeywords.robot

index 2e17b5811445791b1304fa49694e2a14bbe3e753..ca5dbb283f46504e2ce171fb21f776fb90019bf3 100644 (file)
@@ -5,6 +5,7 @@ Variables         ../variables/topoprocessing/TopologyRequests.py
 Library           RequestsLibrary
 Library           SSHLibrary
 Library           XML
+Resource          CompareStream.robot
 Resource          KarafKeywords.robot
 Resource          SetupUtils.robot
 Resource          Utils.robot
@@ -67,8 +68,8 @@ Setup Environment
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
     Open Connection    ${ODL_SYSTEM_IP}
     Flexible Controller Login
-    Run Keyword If    '${ODL_STREAM}' == 'carbon'    Put File    ${CONFIGURATION_CFG}    ${REMOTE_CFG_FILE}
-    Run Keyword Unless    '${ODL_STREAM}' == 'carbon'    Put File    ${CONFIGURATION_XML}    ${REMOTE_XML_FILE}
+    CompareStream.Run_Keyword_If_At_Least_Carbon    Put File    ${CONFIGURATION_CFG}    ${REMOTE_CFG_FILE}
+    CompareStream.Run_Keyword_If_At_Most_Boron    Put File    ${CONFIGURATION_XML}    ${REMOTE_XML_FILE}
     Close Connection
     Wait Until Keyword Succeeds    2x    2s    Issue Command On Karaf Console    log:set DEBUG org.opendaylight.topoprocessing
     Install a Feature    odl-restconf-noauth    timeout=30
@@ -80,8 +81,8 @@ Setup Environment
 Install Features
     [Arguments]    ${features}    ${timeout}=180
     [Documentation]    Install features according to tested distribution
-    Run Keyword If    '${ODL_STREAM}' == 'beryllium'    Install Features for Beryllium Distribution    ${features}    ${timeout}
-    ...    ELSE    Install Features for Other Distributions    ${features}    ${timeout}
+    CompareStream.Run_Keyword_If_At_Most_Beryllium    Install Features for Beryllium Distribution    ${features}    ${timeout}
+    CompareStream.Run_Keyword_If_At_Least_Boron    Install Features for Other Distributions    ${features}    ${timeout}
 
 Install Features for Beryllium Distribution
     [Arguments]    ${features}    ${timeout}
@@ -105,8 +106,8 @@ Clean Environment
     Log    ---- Clean Environment ----
     Open Connection    ${ODL_SYSTEM_IP}
     Flexible Controller Login
-    Run Keyword If    '${ODL_STREAM}' == 'carbon'    Put File    ${OPERATIONAL_CFG}    ${REMOTE_CFG_FILE}
-    Run Keyword Unless    '${ODL_STREAM}' == 'carbon'    Put File    ${OPERATIONAL_XML}    ${REMOTE_XML_FILE}
+    CompareStream.Run_Keyword_If_At_Least_Carbon    Put File    ${OPERATIONAL_CFG}    ${REMOTE_CFG_FILE}
+    CompareStream.Run_Keyword_If_At_Most_Boron    Put File    ${OPERATIONAL_XML}    ${REMOTE_XML_FILE}
     Close Connection
     Delete All Sessions