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 (cherry picked from commit0ddfff79ee
) (cherry picked from commit677c4c2216
)
This commit is contained in:
parent
ab5a63bf8c
commit
dcd8a695be
|
@ -342,7 +342,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], [$[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]}
|
||||
|
||||
|
@ -455,7 +455,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], [$[0], $[1].flatten()]))
|
||||
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1]).select([$[0], $[1].flatten()]))
|
||||
data:
|
||||
l:
|
||||
{% for role in roles %}
|
||||
|
@ -463,7 +463,7 @@ resources:
|
|||
{% endfor %}
|
||||
service_node_names:
|
||||
yaql:
|
||||
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], [$[0], $[1].flatten()]))
|
||||
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1]).select([$[0], $[1].flatten()]))
|
||||
data:
|
||||
l:
|
||||
{% for role in roles %}
|
||||
|
@ -471,7 +471,7 @@ resources:
|
|||
{% endfor %}
|
||||
short_service_node_names:
|
||||
yaql:
|
||||
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], [$[0], $[1].flatten()]))
|
||||
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1]).select([$[0], $[1].flatten()]))
|
||||
data:
|
||||
l:
|
||||
{% for role in roles %}
|
||||
|
@ -479,7 +479,7 @@ resources:
|
|||
{% endfor %}
|
||||
short_service_bootstrap_node:
|
||||
yaql:
|
||||
expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], [$[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 %}
|
||||
|
|
Loading…
Reference in New Issue