Bug 1313281 - str_replace params can't be from parameters
Summary: str_replace params can't be from parameters
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ga
: 8.0 (Liberty)
Assignee: Steven Hardy
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-01 10:21 UTC by Steven Hardy
Modified: 2016-04-28 13:51 UTC (History)
7 users (show)

Fixed In Version: openstack-heat-5.0.1-3.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-28 13:51:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1539737 0 None None None 2016-03-01 10:22:26 UTC
OpenStack gerrit 282403 0 None None None 2016-03-01 10:23:24 UTC

Description Steven Hardy 2016-03-01 10:21:36 UTC
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 10:23:24 UTC
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.