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
This commit is contained in:
Thomas Herve 2017-03-20 18:07:37 +01:00
parent 2bc62ed305
commit 687c53a05a
1 changed files with 4 additions and 7 deletions

View File

@ -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: