summaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-09-23 11:35:10 +0000
committerGerrit Code Review <review@openstack.org>2016-09-23 11:35:10 +0000
commitf9d6db86edd89efe59fe0db9564ebfae05954788 (patch)
tree5244ebe0d7659024a86c02e995b9db585d059171 /puppet
parent4f3e77137538a119123f3e28ce0fd13e307be129 (diff)
parenta99c06aa9600c2da548e46ece251fd0181f0283b (diff)
Merge "Tolerate missing keys from role_data in service templates"
Diffstat (limited to 'puppet')
-rw-r--r--puppet/services/services.yaml16
1 files changed, 10 insertions, 6 deletions
diff --git a/puppet/services/services.yaml b/puppet/services/services.yaml
index c8d5642c..6a9bab71 100644
--- a/puppet/services/services.yaml
+++ b/puppet/services/services.yaml
@@ -54,8 +54,8 @@ outputs:
data: {s_names: {get_attr: [ServiceChain, role_data, service_name]}}
monitoring_subscriptions:
yaql:
- expression: list($.data.subscriptions.where($ != null))
- data: {subscriptions: {get_attr: [ServiceChain, role_data, monitoring_subscription]}}
+ expression: list($.data.where($ != null).select($.get('monitoring_subscription')).where($ != null))
+ data: {get_attr: [ServiceChain, role_data]}
logging_sources:
# Transform the individual logging_source configuration from
# each service in the chain into a global list, adding some
@@ -77,7 +77,9 @@ outputs:
data:
sources:
- {get_attr: [LoggingConfiguration, LoggingDefaultSources]}
- - {get_attr: [ServiceChain, role_data, logging_source]}
+ - yaql:
+ expression: list($.data.where($ != null).select($.get('logging_sources')).where($ != null))
+ data: {get_attr: [ServiceChain, role_data]}
- {get_attr: [LoggingConfiguration, LoggingExtraSources]}
default_format: {get_attr: [LoggingConfiguration, LoggingDefaultFormat]}
pos_file_path: {get_attr: [LoggingConfiguration, LoggingPosFilePath]}
@@ -90,12 +92,14 @@ outputs:
data:
groups:
- [{get_attr: [LoggingConfiguration, LoggingDefaultGroups]}]
- - {get_attr: [ServiceChain, role_data, logging_groups]}
+ - yaql:
+ expression: list($.data.where($ != null).select($.get('logging_groups')).where($ != null))
+ data: {get_attr: [ServiceChain, role_data]}
- [{get_attr: [LoggingConfiguration, LoggingExtraGroups]}]
config_settings: {map_merge: {get_attr: [ServiceChain, role_data, config_settings]}}
global_config_settings:
map_merge:
yaql:
- expression: list($.data.configs.where($ != null))
- data: {configs: {get_attr: [ServiceChain, role_data, global_config_settings]}}
+ expression: list($.data.where($ != null).select($.get('global_config_settings')).where($ != null))
+ data: {get_attr: [ServiceChain, role_data]}
step_config: {list_join: ["\n", {get_attr: [ServiceChain, role_data, step_config]}]}