Bug 1313281 - str_replace params can't be from parameters
str_replace params can't be from parameters
Status: CLOSED CURRENTRELEASE
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat (Show other bugs)
8.0 (Liberty)
Unspecified Unspecified
high Severity high
: ga
: 8.0 (Liberty)
Assigned To: Steven Hardy
Amit Ugol
: TestOnly, ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-01 05:21 EST by Steven Hardy
Modified: 2016-04-28 09:51 EDT (History)
7 users (show)

See Also:
Fixed In Version: openstack-heat-5.0.1-3.el7ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-28 09:51:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1539737 None None None 2016-03-01 05:22 EST
OpenStack gerrit 282403 None None None 2016-03-01 05:23 EST

  None (edit)
Description Steven Hardy 2016-03-01 05:21:36 EST
Description of problem:
I'd like to use get_param as an input to the params mapping of str_replace, but our validation prevents it:

"ERROR: "str_replace" parameters must be a mapping"

heat_template_version: 2016-04-08

parameters:
  HostnameMap:
    type: json
    default:
      overcloud-controller-0: stevespecial-xyz-123-controller-0

  Hostname:
    type: string
    default: overcloud-controller-0

outputs:
  the_output:
    value:
      str_replace:
        template: {get_param: Hostname}
        params: {get_param: HostnameMap}

It works fine when you disable the validation, so I think we need to relax the validation such that referencing another function is considered valid, or we validate later such that the function has been resolved.


https://bugs.launchpad.net/heat/+bug/1539737
Comment 1 Steven Hardy 2016-03-01 05:23:24 EST
Upstream stable/liberty backport https://review.openstack.org/282403

Note You need to log in before you can comment on or make changes to this bug.