blob: 9af768fa69d99090ebe222b82de34ae3cb339759 [file] [log] [blame]
DR695Hccff30b2017-02-17 18:44:24 -05001*** Settings ***
2Documentation Testing openstack.
3Library String
4Library DNSUtils
5Library Collections
6Library SSHLibrary
7Resource validate_common.robot
8
9
10*** Variables ***
11${ASSETS} ${EXECDIR}/robot/assets/
12
13*** Keywords ***
14Validate vLB Stack
15 [Documentation] Identifies the LB and DNS servers in the vLB stack in the GLOBAL_OPENSTACK_SERVICE_REGION
16 [Arguments] ${stack_name}
17 Run Openstack Auth Request auth
18 ${stack_info}= Wait for Stack to Be Deployed auth ${stack_name}
19 ${stack_id}= Get From Dictionary ${stack_info} id
20 ${server_list}= Get Openstack Servers auth
21 Log Returned from Get Openstack Servers
22
23 #${vpg_unprotected_ip}= Get From Dictionary ${stack_info} vpg_private_ip_0
24 #${vsn_protected_ip}= Get From Dictionary ${stack_info} vsn_private_ip_0
25 ${vlb_public_ip}= Get Server Ip ${server_list} ${stack_info} vlb_name_0 network_name=public
26 ##${vdns_public_ip}= Get Server Ip ${server_list} ${stack_info} vdns_name_0 network_name=public
27
28# SCript hands right here. Trying to figure out what it is....
29 #Wait For Server ${vlb_public_ip}
30 #Wait For Server ${vdns_public_ip}
31 #Log Accessed all servers
32
33
34 # Following is a hack because the stack doesn't always come up clean
35 # Give some time for VLB server to reconfigure the network so our script doesn't hang
36 Log Waiting for ${vlb_public_ip} to reconfigure
37 Sleep 180s
38 #${status} ${data}= Run Keyword And Ignore Error Wait For vLB ${vlb_public_ip}
39 #Return From Keyword if '${status}' == 'PASS'
40 #Close All Connections
41 #Find And Reboot The Server ${stack_info} ${server_list} vlb_name_0
42
43 # Give some time for VLB server to reconfigure the network so our script doesn't hang
44 #Log Waiting for ${vlb_public_ip} to reconfigure
45 #Sleep 180s
46 Wait For vLB ${vlb_public_ip}
47 Log All server processes up
48
49Wait For vLB
50 [Documentation] Wait for the VLB to be functioning as a DNS
51 [Arguments] ${ip}
52 Wait Until Keyword Succeeds 300s 10s DNSTest ${ip}
53 Log Succeeded
54
55DNSTest
56 [Documentation] Wait for the defined VLoadBalancer to process nslookup
57 [Arguments] ${ip}
58 Log Looking up ${ip}
59 #${returned_ip}= Dns Request host1.dnsdemo.openecomp.org ${ip}
60 #Should Contain '${returned_ip}' .