Merge "Remove hardcoded enable_load_balancer from Controller role"
[apex-tripleo-heat-templates.git] / puppet / services / nova-metadata.yaml
index 92373c5..bc7dc1b 100644 (file)
@@ -1,4 +1,4 @@
-heat_template_version: 2016-04-08
+heat_template_version: pike
 
 description: >
   OpenStack Nova API service configured with Puppet
@@ -13,6 +13,14 @@ parameters:
   DefaultPasswords:
     default: {}
     type: json
+  RoleName:
+    default: ''
+    description: Role name on which the service is applied
+    type: string
+  RoleParameters:
+    default: {}
+    description: Parameters specific to the role
+    type: json
   EndpointMap:
     default: {}
     description: Mapping of service endpoint -> protocol. Typically set
@@ -20,15 +28,23 @@ parameters:
     type: json
   NovaWorkers:
     default: 0
-    description: Number of workers for Nova API service.
+    description: Number of workers for Nova services.
     type: number
 
+conditions:
+  nova_workers_zero: {equals : [{get_param: NovaWorkers}, 0]}
+
 outputs:
   role_data:
     description: Role data for the Nova Metadata service.
     value:
       service_name: nova_metadata
       config_settings:
-        nova::api::metadata_workers: {get_param: NovaWorkers}
-        nova::api::metadata_listen: {get_param: [ServiceNetMap, NovaMetadataNetwork]}
+        map_merge:
+        - nova::api::metadata_listen: {get_param: [ServiceNetMap, NovaMetadataNetwork]}
+        -
+          if:
+          - nova_workers_zero
+          - {}
+          - nova::api::metadata_workers: {get_param: NovaWorkers}
       step_config: ""