Update the template_version alias for all the templates to pike.
[apex-tripleo-heat-templates.git] / extraconfig / nova_metadata / krb-service-principals.yaml
index c66e646..59b8e7f 100644 (file)
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
 description: 'Generates the relevant service principals for a server'
 
 parameters:
@@ -46,7 +46,7 @@ resources:
           # Filter null values and values that contain don't contain
           # 'metadata_settings', get the values from that key and get the
           # unique ones.
-          expression: list($.data.where($ != null).where($.containsKey('metadata_settings')).metadata_settings.flatten().distinct())
+          expression: list(coalesce($.data, []).where($ != null).where($.containsKey('metadata_settings')).metadata_settings.flatten().distinct())
           data: {get_param: RoleData}
 
   # Generates entries for nova metadata with the following format:
@@ -57,7 +57,7 @@ resources:
     properties:
       value:
         yaql:
-          expression: let(fqdns => $.data.fqdns) -> dict($.data.metadata.where($ != null and $.type = 'vip').select([concat('managed_service_', $.service, $.network), concat($.service, '/', $fqdns.get($.network))]))
+          expression: let(fqdns => $.data.fqdns) -> dict(coalesce($.data.metadata, []).where($ != null and $.type = 'vip').select([concat('managed_service_', $.service, $.network), concat($.service, '/', $fqdns.get($.network))]))
           data:
             metadata: {get_attr: [IncomingMetadataSettings, value]}
             fqdns:
@@ -72,7 +72,7 @@ resources:
     properties:
       value:
         yaql:
-          expression: dict($.data.where($ != null and $.type = 'node').select([$.service, $.network.replace('_', '')]).groupBy($[0], $[1]))
+          expression: dict(coalesce($.data, []).where($ != null and $.type = 'node').select([$.service, $.network.replace('_', '')]).groupBy($[0], $[1]))
           data: {get_attr: [IncomingMetadataSettings, value]}
 
 outputs: