summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksii Chuprykov <ochuprykov@mirantis.com>2016-06-16 17:26:15 +0300
committerPeter Razumovsky <prazumovsky@mirantis.com>2016-08-24 10:22:24 +0000
commit9a07628ebadd1e261f7df6ba145bca46efd246b1 (patch)
tree01be6f354b2d0fd99d8d26f0f24eff77ab79742e
parent7531f8d65aa432a4cbf0d950b2b0fef982ddade7 (diff)
Add `-k` option to curl call in waitcondition test
This option needed for running test on environments with enabled SSL. Also change template for this test to make it ready to debug. Now you have instance with floating ip and outputs with needed urls. Change-Id: Iaa0f4549586e3c421e3b7fe4573a61e0131d2e9e
Notes
Notes (review): Code-Review+1: Sergey Kraynev <skraynev@mirantis.com> Verified+1: Fuel CI <fuel-ci-bot@mirantis.com> Code-Review+1: Peter Razumovsky <prazumovsky@mirantis.com> Code-Review+1: Vladimir Khlyunev <vkhlyunev@mirantis.com> Code-Review+1: Alexandr Nagovitsyn <anagovitsyn@mirantis.com> Code-Review+2: tatyana-leontovich <tleontovich@mirantis.com> Workflow+1: tatyana-leontovich <tleontovich@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 26 Aug 2016 09:08:51 +0000 Reviewed-on: https://review.openstack.org/330603 Project: openstack/fuel-ostf Branch: refs/heads/master
-rw-r--r--fuel_health/etc/heat_wait_condition_neutron.yaml49
-rw-r--r--fuel_health/tests/tests_platform/test_heat.py3
2 files changed, 43 insertions, 9 deletions
diff --git a/fuel_health/etc/heat_wait_condition_neutron.yaml b/fuel_health/etc/heat_wait_condition_neutron.yaml
index fd66c3b..20fbf00 100644
--- a/fuel_health/etc/heat_wait_condition_neutron.yaml
+++ b/fuel_health/etc/heat_wait_condition_neutron.yaml
@@ -22,6 +22,9 @@ parameters:
22 net: 22 net:
23 description: Name of net to use for server 23 description: Name of net to use for server
24 type: string 24 type: string
25 floating_net:
26 description: Name of the net for floating ip
27 type: string
25 28
26resources: 29resources:
27 wait_condition: 30 wait_condition:
@@ -42,7 +45,7 @@ resources:
42 flavor: {get_param: flavor} 45 flavor: {get_param: flavor}
43 key_name: {get_param: key_name} 46 key_name: {get_param: key_name}
44 networks: 47 networks:
45 - network: {get_param: net} 48 - port: {get_resource: port}
46 user_data_format: RAW 49 user_data_format: RAW
47 user_data: 50 user_data:
48 str_replace: 51 str_replace:
@@ -51,20 +54,50 @@ resources:
51 # Below are some examples of the various ways signals 54 # Below are some examples of the various ways signals
52 # can be sent to the Handle resource 55 # can be sent to the Handle resource
53 # Simple success signal 56 # Simple success signal
54 wc_notify --data-binary '{"status": "SUCCESS"}' 57 wc_notify -k --data-binary '{"status": "SUCCESS"}'
55 # Or you optionally can specify any of the additional fields 58 # Or you optionally can specify any of the additional fields
56 wc_notify --data-binary '{"status": "SUCCESS", "reason": "signal2"}' 59 wc_notify -k --data-binary '{"status": "SUCCESS", "reason": "signal2"}'
57 wc_notify --data-binary '{"status": "SUCCESS", "reason": "signal3", "data": "data3"}' 60 wc_notify -k --data-binary '{"status": "SUCCESS", "reason": "signal3", "data": "data3"}'
58 wc_notify --data-binary '{"status": "SUCCESS", "reason": "signal4", "data": "data4"}' 61 wc_notify -k --data-binary '{"status": "SUCCESS", "reason": "signal4", "data": "data4"}'
59 # If you require control of the ID, you can pass it. 62 # If you require control of the ID, you can pass it.
60 # The ID should be unique, unless you intend for duplicate 63 # The ID should be unique, unless you intend for duplicate
61 # signals to overrite each other. The following two calls 64 # signals to overrite each other. The following two calls
62 # do the exact same thing, and will be treated as one signal 65 # do the exact same thing, and will be treated as one signal
63 # (You can prove this by changing count above to 7) 66 # (You can prove this by changing count above to 7)
64 wc_notify --data-binary '{"status": "SUCCESS", "id": "5"}' 67 wc_notify -k --data-binary '{"status": "SUCCESS", "id": "5"}'
65 wc_notify --data-binary '{"status": "SUCCESS", "id": "5"}' 68 wc_notify -k --data-binary '{"status": "SUCCESS", "id": "5"}'
66 # Example of sending a failure signal, optionally 69 # Example of sending a failure signal, optionally
67 # reason, id, and data can be specified as above 70 # reason, id, and data can be specified as above
68 # wc_notify --data-binary '{"status": "FAILURE"}' 71 # wc_notify -k --data-binary '{"status": "FAILURE"}'
69 params: 72 params:
70 wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } 73 wc_notify: { get_attr: ['wait_handle', 'curl_cli'] }
74
75 floating_ip:
76 type: OS::Neutron::FloatingIP
77 properties:
78 floating_network: {get_param: floating_net}
79 port_id: {get_resource: port}
80
81 port:
82 type: OS::Neutron::Port
83 properties:
84 network_id: {get_param: net}
85 security_groups: [{ get_resource: server_security_group }]
86
87 server_security_group:
88 type: OS::Neutron::SecurityGroup
89 properties:
90 name: security-group
91 rules:
92 - remote_ip_prefix: 0.0.0.0/0
93 protocol: tcp
94 port_range_min: 22
95 port_range_max: 22
96 - remote_ip_prefix: 0.0.0.0/0
97 protocol: icmp
98
99outputs:
100 curl_cli:
101 value: { get_attr: ['wait_handle', 'curl_cli'] }
102 wc_data:
103 value: { get_attr: ['wait_condition', 'data'] }
diff --git a/fuel_health/tests/tests_platform/test_heat.py b/fuel_health/tests/tests_platform/test_heat.py
index 4329d34..adc4d43 100644
--- a/fuel_health/tests/tests_platform/test_heat.py
+++ b/fuel_health/tests/tests_platform/test_heat.py
@@ -850,7 +850,8 @@ class HeatSmokeTests(heatmanager.HeatBaseTest):
850 } 850 }
851 851
852 if 'neutron' in self.config.network.network_provider: 852 if 'neutron' in self.config.network.network_provider:
853 parameters['net'], _ = self.create_network_resources() 853 private, public = self.create_network_resources()
854 parameters['net'], parameters['floating_net'] = private, public
854 template = self.load_template('heat_wait_condition_neutron.yaml') 855 template = self.load_template('heat_wait_condition_neutron.yaml')
855 else: 856 else:
856 template = self.load_template('heat_wait_condition_nova.yaml') 857 template = self.load_template('heat_wait_condition_nova.yaml')