Parcourir la source

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
tags/10.0.0rc1
Oleksii Chuprykov il y a 3 ans
Parent
révision
9a07628eba

+ 41
- 8
fuel_health/etc/heat_wait_condition_neutron.yaml Voir le fichier

@@ -22,6 +22,9 @@ parameters:
22 22
   net:
23 23
     description: Name of net to use for server
24 24
     type: string
25
+  floating_net:
26
+    description: Name of the net for floating ip
27
+    type: string
25 28
 
26 29
 resources:
27 30
   wait_condition:
@@ -42,7 +45,7 @@ resources:
42 45
       flavor: {get_param: flavor}
43 46
       key_name: {get_param: key_name}
44 47
       networks:
45
-          - network: {get_param: net}
48
+          - port: {get_resource: port}
46 49
       user_data_format: RAW
47 50
       user_data:
48 51
         str_replace:
@@ -51,20 +54,50 @@ resources:
51 54
             # Below are some examples of the various ways signals
52 55
             # can be sent to the Handle resource
53 56
             # Simple success signal
54
-            wc_notify --data-binary '{"status": "SUCCESS"}'
57
+            wc_notify -k --data-binary '{"status": "SUCCESS"}'
55 58
             # Or you optionally can specify any of the additional fields
56
-            wc_notify --data-binary '{"status": "SUCCESS", "reason": "signal2"}'
57
-            wc_notify --data-binary '{"status": "SUCCESS", "reason": "signal3", "data": "data3"}'
58
-            wc_notify --data-binary '{"status": "SUCCESS", "reason": "signal4", "data": "data4"}'
59
+            wc_notify -k --data-binary '{"status": "SUCCESS", "reason": "signal2"}'
60
+            wc_notify -k --data-binary '{"status": "SUCCESS", "reason": "signal3", "data": "data3"}'
61
+            wc_notify -k --data-binary '{"status": "SUCCESS", "reason": "signal4", "data": "data4"}'
59 62
             # If you require control of the ID, you can pass it.
60 63
             # The ID should be unique, unless you intend for duplicate
61 64
             # signals to overrite each other.  The following two calls
62 65
             # do the exact same thing, and will be treated as one signal
63 66
             # (You can prove this by changing count above to 7)
64
-            wc_notify --data-binary '{"status": "SUCCESS", "id": "5"}'
65
-            wc_notify --data-binary '{"status": "SUCCESS", "id": "5"}'
67
+            wc_notify -k --data-binary '{"status": "SUCCESS", "id": "5"}'
68
+            wc_notify -k --data-binary '{"status": "SUCCESS", "id": "5"}'
66 69
             # Example of sending a failure signal, optionally
67 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 72
           params:
70 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
+
99
+outputs:
100
+  curl_cli:
101
+    value: { get_attr: ['wait_handle', 'curl_cli'] }
102
+  wc_data:
103
+    value: { get_attr: ['wait_condition', 'data'] }

+ 2
- 1
fuel_health/tests/tests_platform/test_heat.py Voir le fichier

@@ -850,7 +850,8 @@ class HeatSmokeTests(heatmanager.HeatBaseTest):
850 850
         }
851 851
 
852 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 855
             template = self.load_template('heat_wait_condition_neutron.yaml')
855 856
         else:
856 857
             template = self.load_template('heat_wait_condition_nova.yaml')

Chargement…
Annuler
Enregistrer