no doc says I can use a filename as a resource type

Bug #1366845 reported by Mike Spreitzer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Angus Salkeld

Bug Description

In a HOT, you can use a filename as a resource type --- but this is not documented. I am not entirely sure whether this is true generally or is only a feature of the new scaling groups. I am not sure whether I should be saying filename or relative URL reference.

For an example of such usage, look at the template hot/autoscaling.yaml in the heat-templates project; note how it uses "lb_server.yaml" as a resource type. Note that lb_server.yaml is NOT a provider template, rather it is one of the user's templates.

FYI, not as part of this bug (it is already a separate bug, https://bugs.launchpad.net/horizon/+bug/1322258): I am able to create a stack from autoscaling.yaml using the Heat CLI but NOT using the dashboard; in the latter case an error arises because the lb_server.yaml file does not get packaged into the request.

Revision history for this message
Steven Hardy (shardy) wrote :

It's true generally - it's a way of specifying a nested stack, a terser but potentially less flexible alternative to mapping type aliases to nested template names in the environment, aka provider resources.

The lack of nested stack and environment support in the dashboard is a known issue, I raised some bugs about it a while back and Jordan O'Mara has been looking at fixing it:

https://bugs.launchpad.net/horizon/+bug/1322258

https://blueprints.launchpad.net/horizon/+spec/heat-nested-stack

I agree we should probably mention this somewhere in the template guide and/or HOT spec docs, I thought we already did tbh.

Changed in heat:
status: New → Triaged
importance: Undecided → Medium
description: updated
Angus Salkeld (asalkeld)
Changed in heat:
assignee: nobody → Angus Salkeld (asalkeld)
Revision history for this message
Angus Salkeld (asalkeld) wrote :

http://docs.openstack.org/developer/heat/template_guide/environment.html (at the bottom).
But maybe we need something like "using provider templates"

Revision history for this message
Mike Spreitzer (mike-spreitzer) wrote :

I do not even understand example 5 in the environment doc. If the resource is identified by name (my_db_server), why do we need two types involved ("OS::DBInstance" as well as file:///home/mine/all_my_cool_templates/db.yaml)?

Example 3 also shows a URL being used as a resource type.

But the only documented examples of using a URL as a resource type are in examples of environment contents. The reader has not been clearly told that this can be done in templates too. And a reader can be forgiven for missing a general implication about templates that is buried in the environment section. The documentation of the Resources section of a template should explain this feature.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/121533

Changed in heat:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/121533
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=bebeb5df440f5fb813a201ea6e89b42367813ccd
Submitter: Jenkins
Branch: master

commit bebeb5df440f5fb813a201ea6e89b42367813ccd
Author: Angus Salkeld <email address hidden>
Date: Tue Sep 16 12:01:37 2014 +1000

    Sync environment and composition docs from openstack-manuals

    Change-Id: Ib9ca5ffa4df5fd9ed6245d359fe1a8a54a477433
    Closes-bug: #1366845

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-1 → 2015.1.0
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.