Include needed Assure_* keywords in BGP tests 50/36250/3
authorVratko Polak <vrpolak@cisco.com>
Tue, 15 Mar 2016 14:39:43 +0000 (15:39 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 16 Mar 2016 22:26:54 +0000 (22:26 +0000)
Ubuntu tools system seem to be missing ipaddr installation.
This could be fixed on releng/builder side,
but this makes it easier to run on onther environments.

Also, small improvements in Keyword ordering in BGP suites.

Change-Id: Ic863a083d0306ce5c9a7cc8b1f89c061a1e92065
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
csit/suites/bgpcep/bgpingest/bgp_app_peer_prefixcount.robot
csit/suites/bgpcep/bgpingest/manypeers_changecount.robot
csit/suites/bgpcep/bgpingest/manypeers_peercount.robot
csit/suites/bgpcep/bgpingest/manypeers_prefixcount.robot
csit/suites/bgpcep/bgpingest/singlepeer_changecount.robot
csit/suites/bgpcep/bgpingest/singlepeer_prefixcount.robot
csit/suites/bgpcep/bgpuser/bgp_app_peer_basic.robot
csit/suites/bgpcep/bgpuser/cases.robot

index 1fb1ced9bdd05fb7d9be2ac6a5704bb4912ba8d9..b6a8e90394b8252d6f1e3bd18228f3803fe91ab7 100644 (file)
@@ -39,6 +39,7 @@ Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
 Resource          ${CURDIR}/../../../libraries/PrefixCounting.robot
 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
 
 *** Variables ***
 ${BGP_VARIABLES_FOLDER}    ${CURDIR}/../../../variables/bgpuser/
@@ -189,6 +190,8 @@ Setup_Everything
     # Both TODOs would probably need to update every suite relying on current Variables.
     Open_BGP_Peer_Console
     Open_BGP_Aplicationp_Peer_Console
+    SSHKeywords.Require_Python
+    SSHKeywords.Assure_Library_Ipaddr    target_dir=.
     SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/play.py
     SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/bgp_app_peer.py
     SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/ipv4-routes-template.xml
index 545eca8946e2cea03cd848e299c0e45bc5e73add..afed3ad3a614568962c0296f0256f27bde941c5c 100644 (file)
@@ -176,16 +176,16 @@ Setup_Everything
     ChangeCounter.CC_Setup
     PrefixCounting.PC_Setup
     KarafKeywords.Open Controller Karaf Console On Background
-    SSHLibrary.Set_Default_Configuration    prompt=${ODL_SYSTEM_PROMPT}
-    SSHLibrary.Open_Connection    ${ODL_SYSTEM_IP}
-    Utils.Flexible_Controller_Login
     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API}    auth=${AUTH}
     # TODO: Do not include slash in ${OPERATIONAL_TOPO_API}, having it typed here is more readable.
     # TODO: Alternatively, create variable in Variables which starts with http.
     # Both TODOs would probably need to update every suite relying on current Variables.
+    SSHLibrary.Set_Default_Configuration    prompt=${ODL_SYSTEM_PROMPT}
+    SSHLibrary.Open_Connection    ${ODL_SYSTEM_IP}
+    Utils.Flexible_Controller_Login
     SSHKeywords.Require_Python
-    SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/play.py
     SSHKeywords.Assure_Library_Ipaddr    target_dir=.
+    SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/play.py
     # Calculate the timeout value based on how many routes are going to be pushed
     ${period} =    DateTime.Convert_Time    ${CHECK_PERIOD_CHANGE_COUNT_MANY}    result_format=number
     ${timeout} =    BuiltIn.Evaluate    ${TEST_DURATION_MULTIPLIER_CHANGE_COUNT_MANY} * (${COUNT_CHANGE_COUNT_MANY} * 3.0 / 10000 + ${period} * (${REPETITIONS_CHANGE_COUNT_MANY} + 1))
index 444d4b262cfe79944ca65b903330f08fad039ecb..dbeca8d39a2b13edc2323832e27b2ad64df71be2 100644 (file)
@@ -128,13 +128,13 @@ Setup_Everything
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
     ConfigViaRestconf.Setup_Config_Via_Restconf
     PrefixCounting.PC_Setup
-    SSHLibrary.Set_Default_Configuration    prompt=${ODL_SYSTEM_PROMPT}
-    SSHLibrary.Open_Connection    ${ODL_SYSTEM_IP}
-    Utils.Flexible_Controller_Login
     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API}    auth=${AUTH}
     # TODO: Do not include slash in ${OPERATIONAL_TOPO_API}, having it typed here is more readable.
     # TODO: Alternatively, create variable in Variables which starts with http.
     # Both TODOs would probably need to update every suite relying on current Variables.
+    SSHLibrary.Set_Default_Configuration    prompt=${ODL_SYSTEM_PROMPT}
+    SSHLibrary.Open_Connection    ${ODL_SYSTEM_IP}
+    Utils.Flexible_Controller_Login
     SSHKeywords.Require_Python
     SSHKeywords.Assure_Library_Ipaddr    target_dir=.
     SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/play.py
index 072ca3969a236ed2377ab0a3681732c36de9ed50..abcfc60ec2da636437fa48ce1804cee50286401e 100644 (file)
@@ -157,13 +157,13 @@ Setup_Everything
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
     ConfigViaRestconf.Setup_Config_Via_Restconf
     PrefixCounting.PC_Setup
-    SSHLibrary.Set_Default_Configuration    prompt=${ODL_SYSTEM_PROMPT}
-    SSHLibrary.Open_Connection    ${ODL_SYSTEM_IP}
-    Utils.Flexible_Controller_Login
     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API}    auth=${AUTH}
     # TODO: Do not include slash in ${OPERATIONAL_TOPO_API}, having it typed here is more readable.
     # TODO: Alternatively, create variable in Variables which starts with http.
     # Both TODOs would probably need to update every suite relying on current Variables.
+    SSHLibrary.Set_Default_Configuration    prompt=${ODL_SYSTEM_PROMPT}
+    SSHLibrary.Open_Connection    ${ODL_SYSTEM_IP}
+    Utils.Flexible_Controller_Login
     SSHKeywords.Require_Python
     SSHKeywords.Assure_Library_Ipaddr    target_dir=.
     SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/play.py
index ff757a4c7dd5339296413445e91fe1f56f04f84e..1adea99aa3d7dd29b993a11145b62e6ce87a8337 100644 (file)
@@ -43,6 +43,7 @@ Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
 Resource          ${CURDIR}/../../../libraries/PrefixCounting.robot
 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
 
 *** Variables ***
 ${BGP_TOOL_LOG_LEVEL}    info
@@ -214,13 +215,15 @@ Setup_Everything
     ConfigViaRestconf.Setup_Config_Via_Restconf
     ChangeCounter.CC_Setup
     PrefixCounting.PC_Setup
-    SSHLibrary.Set_Default_Configuration    prompt=${TOOLS_SYSTEM_PROMPT}
-    SSHLibrary.Open_Connection    ${TOOLS_SYSTEM_IP}
-    Utils.Flexible_Mininet_Login
     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API}    auth=${AUTH}
     # TODO: Do not include slash in ${OPERATIONAL_TOPO_API}, having it typed here is more readable.
     # TODO: Alternatively, create variable in Variables which starts with http.
     # Both TODOs would probably need to update every suite relying on current Variables.
+    SSHLibrary.Set_Default_Configuration    prompt=${TOOLS_SYSTEM_PROMPT}
+    SSHLibrary.Open_Connection    ${TOOLS_SYSTEM_IP}
+    Utils.Flexible_Mininet_Login
+    SSHKeywords.Require_Python
+    SSHKeywords.Assure_Library_Ipaddr    target_dir=.
     SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/play.py
     # Calculate the timeout value based on how many routes are going to be pushed
     # TODO: Unify formulas with other suites in this directory.
index adc3434441fd31972b27b3d066c8d4b034290e39..62766e4356e46f10ce94b3bde1cda3d2c9e838e1 100644 (file)
@@ -35,6 +35,7 @@ Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
 Resource          ${CURDIR}/../../../libraries/PrefixCounting.robot
 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
 
 *** Variables ***
 ${BGP_TOOL_LOG_LEVEL}    info
@@ -190,13 +191,15 @@ Setup_Everything
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
     ConfigViaRestconf.Setup_Config_Via_Restconf
     PrefixCounting.PC_Setup
-    SSHLibrary.Set_Default_Configuration    prompt=${TOOLS_SYSTEM_PROMPT}
-    SSHLibrary.Open_Connection    ${TOOLS_SYSTEM_IP}
-    Utils.Flexible_Mininet_Login
     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API}    auth=${AUTH}
     # TODO: Do not include slash in ${OPERATIONAL_TOPO_API}, having it typed here is more readable.
     # TODO: Alternatively, create variable in Variables which starts with http.
     # Both TODOs would probably need to update every suite relying on current Variables.
+    SSHLibrary.Set_Default_Configuration    prompt=${TOOLS_SYSTEM_PROMPT}
+    SSHLibrary.Open_Connection    ${TOOLS_SYSTEM_IP}
+    Utils.Flexible_Mininet_Login
+    SSHKeywords.Require_Python
+    SSHKeywords.Assure_Library_Ipaddr    target_dir=.
     SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/play.py
     # Calculate the timeout value based on how many routes are going to be pushed
     # TODO: Replace 20 with some formula from period and repetitions.
index 7aca78e9a279180446be6419591054576902a6f1..f4ad00ecd751e1d6fa481f917b45778de6218700 100644 (file)
@@ -306,6 +306,8 @@ Setup_Everything
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
     SSHLibrary.Set_Default_Configuration    prompt=${TOOLS_SYSTEM_PROMPT}
     Open_BGP_Peer_Console
+    SSHKeywords.Require_Python
+    SSHKeywords.Assure_Library_Ipaddr    target_dir=.
     SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/play.py
     Open_BGP_Aplicationp_Peer_Console
     SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/bgp_app_peer.py
index edb0a8e79afaf29de8a7aa76061e20a5ee5211a8..d00b73f9253711c8e6be4955960747611156c710 100644 (file)
@@ -211,8 +211,6 @@ Setup_Everything
     ...    prepare directories for responses, put Python tool to mininet machine, setup imported resources.
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
     SSHLibrary.Set_Default_Configuration    prompt=${TOOLS_SYSTEM_PROMPT}
-    SSHLibrary.Open_Connection    ${TOOLS_SYSTEM_IP}
-    Utils.Flexible_Mininet_Login
     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_TOPO_API}    auth=${AUTH}
     # TODO: Do not include slash in ${OPERATIONAL_TOPO_API}, having it typed here is more readable.
     # TODO: Alternatively, create variable in Variables which starts with http.
@@ -222,6 +220,10 @@ Setup_Everything
     # The previous suite may have been using the same directories.
     OperatingSystem.Create_Directory    ${EXPECTED_RESPONSES_FOLDER}
     OperatingSystem.Create_Directory    ${ACTUAL_RESPONSES_FOLDER}
+    SSHLibrary.Open_Connection    ${TOOLS_SYSTEM_IP}
+    Utils.Flexible_Mininet_Login
+    SSHKeywords.Require_Python
+    SSHKeywords.Assure_Library_Ipaddr    target_dir=.
     SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/play.py
     ConfigViaRestconf.Setup_Config_Via_Restconf
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${CONTROLLER_LOG_LEVEL}