summaryrefslogtreecommitdiffstats
path: root/robot/resources/stack_validation/validate_common.robot
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2017-02-17 18:44:24 -0500
committerDR695H <dr695h@att.com>2017-02-17 18:44:41 -0500
commitccff30b6e325f359879595998e83bbfe6624c851 (patch)
treec98f950f33baa71d21b091b6b10ca3ffb7700467 /robot/resources/stack_validation/validate_common.robot
parent234c2226d8cb3368a7af3d280a5ec280782bed63 (diff)
Initial checkin of EopenECOMP testsuite
Change-Id: I64a2b6d8cf66169829866b73b3d26a4ff59b0a42 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/stack_validation/validate_common.robot')
-rw-r--r--robot/resources/stack_validation/validate_common.robot51
1 files changed, 51 insertions, 0 deletions
diff --git a/robot/resources/stack_validation/validate_common.robot b/robot/resources/stack_validation/validate_common.robot
new file mode 100644
index 00000000..eb7f9f5a
--- /dev/null
+++ b/robot/resources/stack_validation/validate_common.robot
@@ -0,0 +1,51 @@
+*** Settings ***
+Documentation Testing openstack.
+Library OperatingSystem
+Library SSHLibrary
+Library RequestsLibrary
+Library JSONUtils
+Library OpenstackLibrary
+Library HEATUtils
+Library Collections
+Resource ../../resources/openstack/keystone_interface.robot
+Resource ../../resources/openstack/nova_interface.robot
+Resource ../../resources/openstack/heat_interface.robot
+Resource ../../resources/ssh/files.robot
+Resource ../../resources/ssh/processes.robot
+Resource packet_generator_interface.robot
+
+
+*** Variables ***
+${ASSETS} ${EXECDIR}/robot/assets/
+${VFW_STACK_NAME} EcompETE_VFWStack
+${VLB_STACK_NAME} EcompETE_VLBStack
+${DNS_STACK_NAME} EcompETE_DNSStack
+
+*** Keywords ***
+Wait For Server
+ [Documentation] Attempts to login to the passed server info and verify (??). Uses server info to get public ip and locate corresponding provate key file
+ [Arguments] ${server_ip} ${timeout}=300s
+ ${file}= Catenate ${ASSETS}keys/robot_ssh_private_key.pvt
+ Wait Until Keyword Succeeds ${timeout} 5 sec Open Connection And Log In ${server_ip} root ${file}
+ ${lines}= Grep Local File "Accepted publickey" /var/log/auth.log
+ Log ${lines}
+ Should Not Be Empty ${lines}
+
+Get Server Ip
+ [Arguments] ${server_list} ${stack_info} ${key_name} ${network_name}=public
+ ${server_name}= Get From Dictionary ${stack_info} ${key_name}
+ ${server}= Get From Dictionary ${server_list} ${server_name}
+ Log Entering Get Openstack Server Ip
+ ${ip}= Get Openstack Server Ip ${server} network_name=${network_name}
+ Log Returned Get Openstack Server Ip
+ [Return] ${ip}
+
+Find And Reboot The Server
+ [Documentation] Code to reboot the server by teh heat server name parameter value
+ [Arguments] ${stack_info} ${server_list} ${server_name_parameter}
+ ${server_name}= Get From Dictionary ${stack_info} ${server_name_parameter}
+ ${vfw_server}= Get From Dictionary ${server_list} ${server_name}
+ ${vfw_server_id}= Get From Dictionary ${vfw_server} id
+ Reboot Server auth ${vfw_server_id}
+
+