Bug 1313281

Summary: str_replace params can't be from parameters
Product: Red Hat OpenStack Reporter: Steven Hardy <shardy>
Component: openstack-heatAssignee: Steven Hardy <shardy>
Status: CLOSED CURRENTRELEASE QA Contact: Amit Ugol <augol>
Severity: high Docs Contact:
Priority: high    
Version: 8.0 (Liberty)CC: jschluet, mburns, rhel-osp-director-maint, sbaker, shardy, srevivo, zbitter
Target Milestone: gaKeywords: TestOnly, ZStream
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 13:51:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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