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
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
Don't ignore event creation errors

Don't catch exceptions when creating events and instead let the error
propagate. Exceptions when storing events could hide programming errors
and doesn't seem to protect against real issues. The patch also fixes
the tests breaking.

Change-Id: I5eef34c0ed20f9700756e479ace6408304d2cebe
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
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"
Merge "Don't ignore event creation errors"
Don't pass enable_snat by default in Router

The patch removes the default for enable_snat in the Router resource and
removes the value if not specified, to make it possible for non-admin
users to create routers: a policy rule in neutron forbids non-admin to
pass the enable_snat value.

It doesn't break backward compatibility as enable_snat is the default in
neutron.

Co-Authored-By: ala.rezmerita@cloudwatt.com
Closes-Bug: #1306593
Change-Id: Ib9d31f7e0a246bcaa663aaa74755526f8e31df7e
Merge "Don't pass enable_snat by default in Router"