Allow filtering of stacks by action

Currently users can already filter by status.  Since status and action
are so closely tied, it is valuable to be able to filter by action as
well.  As a result, users can filter stacks in a more meaningful way.
For example, /stacks?action=CREATE&status=IN_PROGRESS

Implements: blueprint filter-by-action
Change-Id: I58bf53373e0a9231d198d8fb62e76b1373587b87
Sync oslo incubator

Synchronize all olso modules, removing the ones that were removed that
we don't use anymore.

Change-Id: Idca29b32ef0561c9c436d5a692a02acbe79027b1
Do not use suppport message if it's None

'message' attribute of SupportStatus class has default value equal None.
If you use support_status value in Schema class without providing
'message', you will get in documentation warning in form: DEPRECATED - None.
It looks confused and in such case we should display only 'status'
attribute: DEPRECATED.

Change-Id: I482fe6a9ca134e9e3bc54282b4b10ed98c29b028
Move some template validation to Template class

This patch moves some template validation code to the Template class'
validate() method which has been introduced in change
https://review.openstack.org/#/c/83758 .

Going forward, this should make it easy to perform specific
validtion in Template sub-classes (HOT, CFN).

Change-Id: Iaf86f48d462231a7aa51adb642ea8920f9f43892
Fix inaccurate error_msg for InvalidTemplateVersion

We should give the suggestion about the corresponding versions if the template
version is invalid while initializing a template object, instead giving the
all versions.

Change-Id: Ic1a11903e0142c68a713bd7e05c517466923571b
Add hint on creating new user for Heat in DevStack

Mention heat_stack_owner role in the docs for DevStack.

Change-Id: I5f3e0405684fffa0aa05d1552ca0f6e7074471aa
Partial-Bug: #1306665
Merge "Sync oslo incubator"
Merge "Fix inaccurate error_msg for InvalidTemplateVersion"
Implement locking in abandon stack

This change implements locking in abandon stack. If lock
acquire fails throws ActionInPrgoress exception.

Change-Id: I930123efa95b2863c4e2de01f4646b6e3d68c5cc
Closes-bug: #1301311
Merge "Implement locking in abandon stack"
Merge "Add hint on creating new user for Heat in DevStack"
Push COMPLETE status change at the end of update

This patch moves the status change of stack update to the very end of
the update task, to avoid a race condition where the status of the stack
is UPDATE_COMPLETE but stack-show could return the previous resources.

Change-Id: I04abcf2e876d1de36a36bcd1596a2fd510669744
Closes-Bug: #1308682
Make template validation uniform

There were two different behaviours during template validation and creation
stack (with template validation). In first case error was raised if
template did not have any resources. However user could create stack
without error using this such kind of template.
This patch make behaviour equal for both variant and gives ability to
create and successfully validate stack with template which does not have
resources.

Change-Id: I4dc30ccdc45e0fa7ff678b434106e056dba5f3b4
Closes-Bug: #1278090
Merge "Do not use suppport message if it's None"
Merge "Allow filtering of stacks by action"
Merge "Make template validation uniform"
Support multiple heatclient versions for SD

The software_deployment resources lazy loads data via the
heatclient _get() function. Not only is this function private
but the oslo-incubator recently reverted things such that
get() should once again be used for lazy loading details.

See oslo-incubator commit 04a1abe59ac39890f57d2eed57d3d1b12bb5d757

This was merged into heatclient master in:

72017c566850da589f7dc7dc275871986aadbd54

This patch makes it so that heat will work with both versions
of heatclient.

Change-Id: I1799636d39cea410b55ffe72eeecba4f4a7a0f80
Closes-bug: #1308770
Avoid redundant polling of DB for metadata

Every time self.metadata is read, it triggers a refresh from the database.
We were accessing it multiple times in a loop, which is not only wasteful
but can get very O(n^2) for a WaitCondition with a high Count.

Partial-Bug: #1306743

Change-Id: I1a82afac6c4ef56dbf87722648034c05abef4010
Merge "Support multiple heatclient versions for SD"
Add "index_var" property to the resource group resource

This property allows a template author to replace values in the
nested resource_ref with the index of the specific instance of
that resource in the group. This allows a user to, for example,
add the index of the resource to server names in order to make
them more easily distinguishable when listed outside of Heat.

Implemements: blueprint override-resource-name-in-resource-group
Change-Id: I4339067e3b8927573acff0ab5968de61a3253d07