map_replace should allow noop colliding replacements
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Steven Hardy |
Bug Description
There is validation in the map_replace code which aims to avoid corruption of the input map when keys collide, however it's too strict when you want to do optional replacement, e.g consider:
heat_template_
parameters:
InternalApiNe
default: internal_api
description: The name of the internal API network.
type: string
ExternalNetName:
default: external
description: The name of the external network.
type: string
resources:
NetIpMapValue:
type: OS::Heat::Value
properties:
type: json
value:
- ctlplane: []
- keys:
outputs:
net_ip_map:
description: >
A Hash containing a mapping of network names to assigned lists
of IP addresses.
value: {get_attr: [NetIpMapValue, value]}
This fails now, because the "external" key collides, but it should be allowed as it's a noop. We should still reject the case where ExternalNetName is e.g "ctlplane", but we should allow it when it's either "external", or any non-colliding name.
Changed in heat: | |
milestone: | none → ocata-3 |
status: | New → Triaged |
assignee: | nobody → Steven Hardy (shardy) |
importance: | Undecided → Medium |
Fix proposed to branch: master /review. openstack. org/414080
Review: https:/