fog-openstack
fog-openstack copied to clipboard
Add template_url documentation
I expect
Documentation to reference a stack creation via :template_url https://github.com/fog/fog-openstack/blob/master/docs/orchestration.md
Instead
Only :template is documented
Note
-
template_url may cause issues when templates contain
typeorget_file -
python client implementation in shade retrieves and processes the template from :template_uri as follow:
- search every occurrence of
typeandget_file - if it's not an URI, create an URI out of it, eg.
- populate the
filesparameter - replaces :template_uri with :template
- search every occurrence of
Here's the request trace:
>>> template_url = "https://raw.githubusercontent.com/ioggstream/heat-templates/test_fog/hot/fog_1.yaml"`
>>> shade_client.create_stack('test', template_url=template_ur)
REQ: curl -g -i -X POST https://heat.example.com -H "User-Agent: python-heatclient" ... -d '
{
"stack_name": "d4",
"files": {
"https://raw.githubusercontent.com/ioggstream/heat-templates/test_fog/hot/fog_2.yaml": "snip"
},
"template": {
"heat_template_version": "newton",
"resources": {
"a_file": {
"type": "https://raw.githubusercontent.com/ioggstream/heat-templates/test_fog/hot/fog_2.yaml"
} } },
...
}
'
shade code is here https://github.com/openstack-infra/shade/blob/master/shade/openstackcloud.py#L1201
@seanhandley @Ladas @bzwei Please check this comment on using template_url in heat. In fog we could either:
- ignore file resolution when template_url is used;
- inherit the heatclient / shade behavior and replace it with a parsed template.
Consider that if both template and template_url are specified, heat server ignores template_url.
This will impact on both fog documentation and behavior.