-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Description
Currently, the library allows only top level map definitions. Something that would be nice is the option to create parameters in a following way.
With this yaml:
my_node:
my_params:
params_to_be_mapped: {
type: string_array,
}
__map_params_to_mapped:
in_map_param: {
type: bool,
}When attempting to do so, the current Jinja template will create the following code:
# declare any new dynamic parameters
for value_1 in updated_params.params_to_mapped:
updated_params.my_params.add_entry(value_1)
# ...
for value_1 in updated_params.params_to_mapped:
param_name = f"{self.prefix_}my_params.{value_1}.in_map_param"
# ...
# declare and set all dynamic parameters
for value_1 in updated_params.params_to_mapped:
updated_params.my_params.add_entry(value_1)While the expected output is:
# declare any new dynamic parameters
for value_1 in updated_params.my_params.params_to_mapped:
updated_params.my_params.add_entry(value_1)
# ...
for value_1 in updated_params.my_params.params_to_mapped:
param_name = f"{self.prefix_}my_params.{value_1}.in_map_param"
# ...
# declare and set all dynamic parameters
for value_1 in updated_params.my_params.params_to_mapped:
updated_params.my_params.add_entry(value_1)Namespace of my_params is not taken into account in for loops of the mapped values.
Topic initially started in #183.
BrunoB81HK, DaniGarciaLopez, KentaKato and ma-ath
Metadata
Metadata
Assignees
Labels
No labels