heatclient should accept multiple environment files

Bug #1350403 reported by Peter Belanyi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-heatclient
Fix Released
High
Peter Belanyi

Bug Description

Currently heatclient accepts only one environment file, while it would be useful to accept more than one (in tripleo we would like to pass in several enviroment files, e.g. 1 containing parameters, 1 for resource mapping).

heatclient loads the env file and passes its contents to the api as a dictionary, so it seems possible to process several files, merge the resulting dicts and send it to the api.

Peter Belanyi (pbelanyi)
Changed in heat:
assignee: nobody → Peter Belanyi (pbelanyi)
Qiming Teng (tengqim)
Changed in heat:
status: New → In Progress
Revision history for this message
Steven Hardy (shardy) wrote :

To clarify, this is about adding some convenience preprocessing to python-heatclient, not modifying the heat API right?

If so, then this should be marked as affecting python-heatclient not heat.

Also, can you outline how you expect to handle the merge strategy, in the event of collisions between the environment files to be merged?

Revision history for this message
Peter Belanyi (pbelanyi) wrote :

You are right, it only affects python-heatclient. I have already submitted a patch: https://review.openstack.org/110984

In my patch I chose to process the environment files in the order they appear on the command line, and have the newer values overwrite the old ones in case of collisions.

affects: heat → python-heatclient
Revision history for this message
Unmesh Gurjar (unmesh-gurjar) wrote :

Just a thought: (IMO) Collisions are accidental. So, (only) in case of a collision, would it be good to show the user the final value that will be used and give him a chance to confirm before proceeding with the operation?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-heatclient (master)

Reviewed: https://review.openstack.org/110984
Committed: https://git.openstack.org/cgit/openstack/python-heatclient/commit/?id=b3d350ad3e5776875b24ef63e1ff3a5d1ba87531
Submitter: Jenkins
Branch: master

commit b3d350ad3e5776875b24ef63e1ff3a5d1ba87531
Author: root <email address hidden>
Date: Thu Jul 31 09:07:37 2014 -0400

    Add support for multiple environment files

    This patch adds support for heat to accept multiple -e commandline
    arguments. The environment files are merged, with newer values
    overwriting older ones.

    Change-Id: I01e2baf8dea3bafb1ac6eac34f281c5ff86bf4aa
    Closes-Bug: 1350403

Changed in python-heatclient:
status: In Progress → Fix Committed
Zane Bitter (zaneb)
Changed in python-heatclient:
importance: Undecided → High
Changed in python-heatclient:
milestone: none → v0.2.11
Changed in python-heatclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.