blob: eb7f9f5ad36a7a803e5b4cf1fb46e94a5723d4dc [file] [log] [blame]
DR695Hccff30b2017-02-17 18:44:24 -05001*** Settings ***
2Documentation Testing openstack.
3Library OperatingSystem
4Library SSHLibrary
5Library RequestsLibrary
6Library JSONUtils
7Library OpenstackLibrary
8Library HEATUtils
9Library Collections
10Resource ../../resources/openstack/keystone_interface.robot
11Resource ../../resources/openstack/nova_interface.robot
12Resource ../../resources/openstack/heat_interface.robot
13Resource ../../resources/ssh/files.robot
14Resource ../../resources/ssh/processes.robot
15Resource packet_generator_interface.robot
16
17
18*** Variables ***
19${ASSETS} ${EXECDIR}/robot/assets/
20${VFW_STACK_NAME} EcompETE_VFWStack
21${VLB_STACK_NAME} EcompETE_VLBStack
22${DNS_STACK_NAME} EcompETE_DNSStack
23
24*** Keywords ***
25Wait For Server
26 [Documentation] Attempts to login to the passed server info and verify (??). Uses server info to get public ip and locate corresponding provate key file
27 [Arguments] ${server_ip} ${timeout}=300s
28 ${file}= Catenate ${ASSETS}keys/robot_ssh_private_key.pvt
29 Wait Until Keyword Succeeds ${timeout} 5 sec Open Connection And Log In ${server_ip} root ${file}
30 ${lines}= Grep Local File "Accepted publickey" /var/log/auth.log
31 Log ${lines}
32 Should Not Be Empty ${lines}
33
34Get Server Ip
35 [Arguments] ${server_list} ${stack_info} ${key_name} ${network_name}=public
36 ${server_name}= Get From Dictionary ${stack_info} ${key_name}
37 ${server}= Get From Dictionary ${server_list} ${server_name}
38 Log Entering Get Openstack Server Ip
39 ${ip}= Get Openstack Server Ip ${server} network_name=${network_name}
40 Log Returned Get Openstack Server Ip
41 [Return] ${ip}
42
43Find And Reboot The Server
44 [Documentation] Code to reboot the server by teh heat server name parameter value
45 [Arguments] ${stack_info} ${server_list} ${server_name_parameter}
46 ${server_name}= Get From Dictionary ${stack_info} ${server_name_parameter}
47 ${vfw_server}= Get From Dictionary ${server_list} ${server_name}
48 ${vfw_server_id}= Get From Dictionary ${vfw_server} id
49 Reboot Server auth ${vfw_server_id}
50
51