aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Herve <therve@redhat.com>2017-03-20 18:07:37 +0100
committerThomas Herve <therve@redhat.com>2017-04-10 10:15:52 +0000
commit687c53a05a3045e7d889ddb17bca2eda0151d8a2 (patch)
tree542b6f59771bf9c101024af0238e91c9095bb63e
parent2bc62ed305f73ca06e37559819edc6498446a1a0 (diff)
Remove yaql call when building logging_groups
yaql calls are fairly expensive. Let's try to not nest them when we can avoid it. Change-Id: I5e7dbc42be625bbfe7989867794a67ebae08687d
-rw-r--r--puppet/services/services.yaml11
1 files changed, 4 insertions, 7 deletions
diff --git a/puppet/services/services.yaml b/puppet/services/services.yaml
index a2286d16..9820b431 100644
--- a/puppet/services/services.yaml
+++ b/puppet/services/services.yaml
@@ -90,14 +90,11 @@ outputs:
# fluentd user.
yaql:
expression: >
- set($.data.groups.flatten()).where($)
+ set(($.data.default + $.data.extra + $.data.role_data.where($ != null).select($.get('logging_groups'))).flatten()).where($)
data:
- groups:
- - [{get_attr: [LoggingConfiguration, LoggingDefaultGroups]}]
- - yaql:
- expression: list($.data.role_data.where($ != null).select($.get('logging_groups')).where($ != null))
- data: {role_data: {get_attr: [ServiceChain, role_data]}}
- - [{get_attr: [LoggingConfiguration, LoggingExtraGroups]}]
+ default: {get_attr: [LoggingConfiguration, LoggingDefaultGroups]}
+ extra: {get_attr: [LoggingConfiguration, LoggingExtraGroups]}
+ role_data: {get_attr: [ServiceChain, role_data]}
config_settings: {map_merge: {get_attr: [ServiceChain, role_data, config_settings]}}
global_config_settings:
map_merge: