Do not use the 3rd argument of yaql groupBy

Due to an incompatible change in yaql, it's hard to use the aggregration
of groupBy as the behavior is completely different depending on the
version. Let's try to not rely on it.

Change-Id: I2887011f6baf4867d422579b116b5e143acf5679
Related-Bug: #1750032
This commit is contained in:
Thomas Herve 2018-02-19 16:32:42 +01:00
parent 0d78b528d2
commit 0ddfff79ee
1 changed files with 6 additions and 6 deletions

View File

@ -532,7 +532,7 @@ resources:
# list of maps, but appends to colliding lists so we can
# create a map of lists for all nodes for each network
yaql:
expression: dict($.data.where($ != null).flatten().selectMany($.items()).groupBy($[0], $[1], $.flatten()))
expression: dict($.data.where($ != null).flatten().selectMany($.items()).groupBy($[0], $[1]).select([$[0], $[1].flatten()]))
data:
- {get_attr: [{{role.name}}, hostname_map]}
@ -688,7 +688,7 @@ resources:
# list of maps, but appends to colliding lists when a service
# is deployed on more than one role
yaql:
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], $.flatten()))
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1]).select([$[0], $[1].flatten()]))
data:
l:
{% for role in roles %}
@ -696,7 +696,7 @@ resources:
{% endfor %}
service_node_names:
yaql:
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], $.flatten()))
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1]).select([$[0], $[1].flatten()]))
data:
l:
{% for role in roles %}
@ -704,7 +704,7 @@ resources:
{% endfor %}
short_service_node_names:
yaql:
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], $.flatten()))
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1]).select([$[0], $[1].flatten()]))
data:
l:
{% for role in roles %}
@ -712,7 +712,7 @@ resources:
{% endfor %}
short_service_bootstrap_node:
yaql:
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], $.flatten().first()))
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1]).select([$[0], $[1].flatten().first()]))
data:
l:
{% for role in roles %}
@ -904,7 +904,7 @@ resources:
# list of maps, but appends to colliding lists when a service
# is deployed on more than one role
yaql:
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], $.flatten()))
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1]).select([$[0], $[1].flatten()]))
data:
l:
{% for role in roles %}