458 Commits

Author SHA1 Message Date
huangtianhua
bfd8d7b2ab Provide 'or' function
Provides condition function 'or' for templates:
AWSTemplateFormatVersion.2010-09-09
heat_template_version.2016-10-14

Change-Id: I6888453404a2cba5127e5d89f7445c5dfe2b7a37
Blueprint: support-conditions-function
2016-08-29 14:31:19 -04:00
huangtianhua
6fa325e34e Provide 'and' function
Provides condition function 'and' for templates:
AWSTemplateFormatVersion.2010-09-09
heat_template_version.2016-10-14

Blueprint: support-conditions-function
Change-Id: I7a9a10b871f50a5a2885adc72d60d626f960557c
2016-08-26 01:44:24 +00:00
huangtianhua
aeb15bf818 Provides 'not' condition function
Support 'not' and 'Fn::Not' for templates:
AWSTemplateFormatVersion.2010-09-09
heat_template_version.2016-10-14

Change-Id: I6a9c89a23160a2cf06c37677871bcfbfab9599be
Blueprint: support-conditions-function
2016-08-25 01:14:34 +00:00
huangtianhua
4c4d790c62 Provides 'if' intrinsic function
Provides condition function 'if' for templates:
AWSTemplateFormatVersion.2010-09-09
heat_template_version.2016-10-14

Change-Id: I34c342de176bc87c9cde41aa32478e386f045422
Blueprint: support-conditions-function
2016-08-25 01:14:14 +00:00
huangtianhua
4552e08767 Support condition for output
Provides output condition for cfn/hot templates,
if the condition of output evaluates to false, will
set output value to None.

Change-Id: I0398e39541a4176ef5699331c10536c59f1cb3e7
Blueprint: support-conditions-function
2016-08-25 09:10:33 +08:00
huangtianhua
59476f63bc Support condition for resource
Support condition section in resource definition.

Change-Id: Ic63debbf71c158e397ca3d9b9047eafdd598830b
Blueprint: support-conditions-function
Closes-Bug: #1605485
2016-08-24 09:57:07 +00:00
Jenkins
0803639788 Merge "Add support for a resource level external_id" 2016-08-15 04:00:27 +00:00
Jenkins
a6d8b95db5 Merge "Fix path_in_stack for scheduler hints" 2016-08-14 22:00:21 +00:00
Jenkins
b996edfab2 Merge "Support maps as argument for repeat/for_each" 2016-08-14 21:51:44 +00:00
Giulio Fidente
9fc7b1de43 Support maps as argument for repeat/for_each
Turns out we just need to count collection.Mapping as valid arg.

Change-Id: Id450e777930bb0b749c0ecfab0679a52a84fd7fe
2016-08-12 15:30:16 +02:00
ricolin
c385388ea1 Add support for a resource level external_id
This adds support for the following to the template:
 heat_template_version: 2016-10-14
 resources:
   ...
   res_a:
     type: OS::Nova::Server
     external_id: the-new-server-id
     properties:
     ...

Co-Authored-By: Rico Lin <rico.l@inwinstack.com>

blueprint external-resources
Change-Id: I8fda1380504d1d8b1e96649bf20b86d6309fdeca
2016-08-12 15:59:14 +08:00
Rabi Mishra
372a2376b8 Fix path_in_stack for scheduler hints
Nova expects scheduler_hints to be a DictOfListOfStrings in
the object layer(versioned objects), though there is no
limitation for this in the api layer. Thefore sending a
list of tuples as a scheduler_hint results in error.

This also sets stack_scheduler_hints=true for integration
tests.

Change-Id: Id7575f67657fab86acb22d86807127dda45305d5
Closes-Bug: #1608452
2016-08-05 10:21:10 +00:00
huangtianhua
70c4ab3fcf Support 'conditions' section for templates
This changes:
1. Support 'Conditions' for AWSTemplateFormatVersion: 2010-09-09
2. Support 'conditions' for heat_template_version: 2016-10-14
3. There is no need to add a new HeatTemplateFormatVersion template,
   because we decide to support conditions in AWSTemplateFormatVersion
   and heat_template_version: 2016-10-14, so remove the
   HeatTemplateFormatVersion.2016-10-14
4. Move the definition of function 'equals' to hot/functions.py
5. Mark 'equals' as condition function which supported in conditions.

Change-Id: I2e7bdfa1c2052e75f35f2bd0003cdc170188d8b8
Blueprint: support-conditions-function
2016-08-03 09:17:31 +08:00
Jenkins
e1178a3120 Merge "Fix two typos" 2016-08-02 11:50:33 +00:00
Atsushi SAKAI
d87c8befb4 Fix two typos
examnple   => example
restrcited => restricted

Change-Id: I22bc1d317892047dd6179defa915af09ddc5ac9a
2016-08-02 19:09:38 +09:00
Jenkins
8cd5f64dfb Merge "Purge deleted stacks for specific project" 2016-08-02 09:34:56 +00:00
Jenkins
7fced683cb Merge "Correct doc about os-collect-config metadata polling" 2016-08-02 06:37:45 +00:00
Steven Hardy
f019fb002e Fix some map_replace issues
While testing I discovered a couple of corner cases not previously
handled:
- If you provide values/keys via a get_attr reference it's possible for
them to be None during validation
- If the input map has an unhashable value, it breaks the values replacement
so we need to tolerate a failure to lookup an unhashable key in the values
data.

Change-Id: I14d92056e0a07816a216aba752711887e8ac0aa5
2016-07-21 18:55:21 +01:00
Ala Rezmerita
61836dbf42 Purge deleted stacks for specific project
Add project-id argument to heat-manage purge_deleted command in order
to be able to hard delete DB entries for a specific project.

Change-Id: Ifffe5657a40ce97db9d059ff1516b8e1eb801132
Implements: bp heat-manage-purge-deleted-tenant
2016-07-20 17:02:12 +00:00
Steven Hardy
ab57f5478a Add reno for map_replace and fix docs nit
I missed adding the reno in https://review.openstack.org/#/c/343731/
and there was a minor docs nit mentiond also.

Change-Id: Ib78ca19b96a239c0a06758c259e2e74e10ed26e5
2016-07-20 08:46:36 +01:00
Steven Hardy
b862945889 Implement map_replace intrinsic function
This adds a new map_replace function that can iterate over a map
(e.g json parameter) doing key/value replacements.

Change-Id: I29f0e438c398fda715c79727ed5de8383e5b5d7b
Implements-Blueprint: blueprint map-replace-function
2016-07-19 17:07:45 +01:00
Jenkins
95a359ab3e Merge "Add information about Resolve rule to docs" 2016-07-07 23:36:03 +00:00
Jenkins
654d06ae29 Merge "Change namespace 'ceilometer' to 'aodh'" 2016-07-06 17:23:05 +00:00
huangtianhua
25639d8c17 Correct doc about os-collect-config metadata polling
Now the agent os-collect-config polls metadata from some
transports not only from heat service.

Change-Id: Ie77e8c822cdb73a1970a1f061ddd105c033f09f3
2016-07-06 10:41:09 +08:00
huangtianhua
8a4df57c37 Change namespace 'ceilometer' to 'aodh'
Change namespace of some files to '*aodh*' instead of '*ceilometer*'.

Blueprint migrate-to-use-aodh-for-alarms

Change-Id: I2c4d565ded5f9f7146b23479acd2702f976b8833
2016-07-04 03:22:49 +00:00
Yosef Hoffman
fd1e9f7cea Fix Broken Link in Contributing > Blueprints Doc
The template link points to
http://git.openstack.org/cgit/openstack/heat-specs/tree/specs/template.rst
which shows a "Path not found" error. This patch instead points it to
http://git.openstack.org/cgit/openstack/heat-specs/tree/specs/templates
and explains that you should pick the template for the latest release.

Change-Id: Ibe202f351eafacdfe9112407f8611b01d5a96ada
Closes-Bug: #1612238
2016-06-30 03:36:44 -04:00
Jenkins
89f4aeedd6 Merge "Update HOT template guide preface" 2016-08-09 15:15:53 +00:00
Atsushi SAKAI
c801b22a21 Update HOT template guide preface
3 years passed since HOT template guide is written
This patch updates preface

Change-Id: If41e1c7c492c87634d03988a29a2a5a5c510888c
2016-08-09 20:46:19 +09:00
Peter Razumovsky
dd45786a80 Add information about Resolve rule to docs
Current Support Status guide omits information about
Resolve rule in translation mechanism, so need to add
it.

Change-Id: I2ad9765bb1c68582c75049d37311e50167a0ada7
Closes-bug: #1597226
2016-06-29 09:44:48 +00:00
Jason Dunsmore
152b03b09b Add default release names for template versions
Release version names are easier for template authors to remember than
seemingly arbitrary dates. It should also make it clearer to new Heat
users that heat_template_version is not like a BIND zone file version
(which would be incremented with each version of the template).

Change-Id: Iae9b6a676702b2a115b18fdfb1ab2afbe5faacde
blueprint support-alias-for-heat-template-version-names
2016-06-28 10:19:24 -05:00
Jenkins
51ec49af10 Merge "Fix broken links in developing_guides index" 2016-06-10 08:22:21 +00:00
Jenkins
900e9a32c1 Merge "Allow deletion_policy to be lowercase in HOT" 2016-06-09 21:13:10 +00:00
Steven Hardy
9d9fd60d1b Fix broken links in developing_guides index
These moved, so update the index, and align it with the parent index
page referencing developing guides content.

Change-Id: I3ffe44b112e0c6f65bb8dcdab064bf6d0879a46a
2016-06-09 16:26:39 +01:00
Jenkins
81ffdc3dfc Merge "Get rid of gratuitous use of six.iterkeys()" 2016-06-07 14:23:28 +00:00
Steven Hardy
d9459c46e0 Fix syntax error in yaql hot spec example
The template example is malformed because the output doesn't define
a value.

Change-Id: I967510a8f1bc4c80570be25dec77c2562d0dd1ec
2016-06-07 11:55:43 +01:00
Zane Bitter
5566e6f2c8 Get rid of gratuitous use of six.iterkeys()
In Python3, dict.keys() returns a view object rather than a list. This
behaves differently in that changes to the dict also modify the view, and
in that the view type interacts with various operators in different ways to
lists.

One universally correct transformation to preserve Python2 behaviour in
Python3 would be to replace all instances of d.keys() with
list(six.iterkeys(d)), and indeed we did. However, like many automatic
transformations the results are usually unsightly, invariably inefficient,
and frequently absurd. Not least because list(d.keys()) and indeed list(d)
are also equivalent.

This patch changes to using the simplest correct method of accessing the
data we want in each case.

This reverts or rewrites most of commit
4ace95ad47da7099191a06325c5d0b156fd54894.

Change-Id: Iba3cf48246d8cbc958d8fb577cd700a218b0bebf
2016-06-07 03:50:49 +00:00
Zane Bitter
1a224a3f5a Allow deletion_policy to be lowercase in HOT
This is more consistent with the rest of the HOT language.

Change-Id: I445e986b067a1311efc23a5d350bd81976253a3f
2016-06-02 12:32:49 -04:00
Zane Bitter
cb565e3074 Correct the docs on deletion_policy in the HOT spec
Change-Id: Ife3fdb9ef97f67a1dbe4478e589247173ad0d444
2016-05-31 12:33:06 -04:00
Jenkins
9c154fca46 Merge "Add template_dir to config" 2016-05-31 04:43:16 +00:00
Jenkins
f6ce49afc7 Merge "RDO-Manager name change" 2016-05-27 20:49:12 +00:00
Jenkins
7b96559c6d Merge "Correct redundancies in Scheduler Hints docs" 2016-05-27 17:48:00 +00:00
ricolin
83966b7bde Add template_dir to config
Allow global environment contain global template files.
This can lead to further access to global template files.
For example a template file `my_tmpl.yaml` under global template
directory (`/etc/heat/templates` by default) can be directly accessed in
stack with `get_file`.
Partial-Bug: #1454401

Change-Id: I0a1c9d50441f88144980214fbc8e6757193cfb41
2016-05-27 13:55:55 +08:00
Yosef Hoffman
fb7f838b8a Correct redundancies in Scheduler Hints docs
On the Heat Stack Lifecycle Scheduler Hints page [1], there are two
occurrences of redundant language. In the first and third paragraphs it
says "...passed *to nova and cinder* by heat as scheduler hints, *to the
configured schedulers for nova and cinder*."

"to the configured schedulers for nova and cinder" is removed from both
sentences in this patch.

[1]
http://docs.openstack.org/developer/heat/developing_guides/schedulerhints.html

Change-Id: I6f525986c82f850f86a20a232b96a36ed7d622cc
Closes-Bug: #1585792
2016-05-26 11:42:55 -04:00
Jenkins
af718ac309 Merge "doc: fix issue in template_guide/software_deployment" 2016-05-26 04:52:46 +00:00
huangtianhua
1d6cc2d18e Provides 'equals' intrinsic function
Provides condition function 'equals' for hot template,
'Fn::Equals' for HeatTemplate, which versions
are 2016-10-14.

Change-Id: Ib0ffa76e6c562dfbddca5f9dce807f2c6ea3eb82
Blueprint: support-conditions-function
2016-05-25 17:02:45 +08:00
Jenkins
2969f0a49e Merge "Add yaql function" 2016-05-24 14:04:48 +00:00
Jenkins
d3f0b2627e Merge "Fix the documentation for HIDDEN support status" 2016-05-18 22:46:04 +00:00
Lukas Bednar
832f15b9e4 doc: fix issue in template_guide/software_deployment
using:

user_data_format: RAW

for OS::Heat::SoftwareConfig causes error during provisioning

Change-Id: I95be8bcb350603d72f598e4c70d9ada847d7c0fb
2016-05-18 18:00:44 +02:00
Jason Dunsmore
95ad071293 Fix the documentation for HIDDEN support status
There were a few inaccuracies in the documentation for the HIDDEN
support status.

Change-Id: I0960c5e342f01035834ce82520eb64e5ded84c6a
2016-05-17 10:04:36 -05:00
Gerard Braad
61b76067d2 RDO-Manager name change
TrivialFix

Change-Id: I5b2b86b77e7a5a8e69259b66c66f07a8d8c906d9
2016-05-17 08:35:20 +00:00