[openstack-dev] [Heat] Does it make sense to have a resource-create API?

Zane Bitter zbitter at redhat.com
Wed Jun 19 11:23:38 UTC 2013


On 19/06/13 06:41, Christopher Armstrong wrote:
> On Tue, Jun 18, 2013 at 11:01 PM, Adrian Otto <adrian.otto at rackspace.com
> <mailto:adrian.otto at rackspace.com>> wrote:
>
>     On Jun 18, 2013, at 6:09 PM, Angus Salkeld <asalkeld at redhat.com
>     <mailto:asalkeld at redhat.com>> wrote:
>      > To me one of the most powerful and apealing things of Heat is the
>      > ability to reproducibly re-create a stack from a template. This
>      > new public API is going to make this difficult.
>
>     Adding an API only makes it difficult if you decide to bypass
>     templates and use the API. You can still be disciplined and keep
>     your templates updated to achieve the reproducible goal. Yes, and
>     API of this sort is a sharp instrument, but it can be useful if
>     applied properly.
>
>
> It seems we could trivialize the task of keeping your template up to
> date by providing an API for fetching a template that reflects the
> current stack. Does that sound sensible given the current direction of
> the design of Heat?

This API already exists:

https://github.com/openstack/heat/blob/stable/grizzly/docs/api.md#retrieve-stack-template

However it is not suitable for this use case because the template 
returned is straight JSON out of the database; it doesn't retain any of 
it's original formatting.

What it is eminently suitable for is applications where you only need a 
machine-readable template (i.e. the same applications where a 
resource-create API could be used). For example, the stateless CAMP 
proxy that Adrian suggested could use this to grab the current template, 
insert/modify any resources it wanted and do a stack update with the 
resulting template.

cheers,
Zane.



More information about the OpenStack-dev mailing list