Engine changes for API param to show soft-deleted stacks

blueprint stack-list-soft-deleted

Change-Id: Ie649d9a2b4132795e048325dedc46900c6f34eac
API changes for param to show soft-deleted stacks

blueprint stack-list-soft-deleted

Change-Id: I9b56ee877746c25c6acefb91fc3eae63701aedd6
Clean up openstack-common.conf

oslo-incubator will introduce new integrity check in [1].
That will help developer find inconsistent issue while copying
from oslo-incubator. The check just outputs warnings. These are
changes according to warning:
 * remove unused module py3kcompat
 * add missing module context, processutils in openstack-common.conf
 * sort the modules in openstack-common.conf
[1] https://review.openstack.org/#/c/76901/

Change-Id: I2fea01148f6ad268a5fcfdaa788e30d6fcb48c3f
Related-Bug: #1295582
Update olso modules

Now at oslo commit a08a622bc68c34291a116f7073511b02585d1c17

Change-Id: Ifd335dac76cdb880661cbd6378438fcebaf295cf
Stop periodic watcher tasks before deleting stack

In the case where a stack that has a watch task associated with it is
being deleted and the engine successfully acquires a lock, no attempt to
stop the stack will be made since it has no action in-progress.  This
will result in orphaned watcher tasks being left behind, since the
watcher tasks are normally stopped as part of the call to
ThreadGroup.stop().

To fix this, explicitly stop the periodic watcher tasks before calling
stack.delete().

Change-Id: Idf5b7c1100fc85743ac6dc5831731f7ecc96bfd6
Closes-Bug: #1315044
Fetch all db resources in one query

Instead of calling resource_get_by_name_and_stack once for every
resource in the stack, db_api.resource_get_all_by_stack is called
only once for all resources.

This reduces the number of sql queries during a describe_stack_resource
call to 3:
1. load the stack
2. load the template
3. load the resources

This is a big improvement over the start of this patch series, which
is 2 queries plus:
* 1 per resource in the stack
* 1 per access to a resource metadata attribute
* 1 per access to a resource data value

There is probably still potential to reduce queries from 3, but this
may well be a fix for
Partial-Bug: 1306743

Change-Id: I80be5d3de8744813d974f2e9860c148ad258f385
Fetch RawTemplate from Stack, not a query

This will allow a future optimisation to prefetch Stack.raw_template
in a single query.

Change-Id: I24a64d6159342b3232667e499808dc0233c83e1f
Eager-load Stack.raw_template for Stack.load

Whenever a stack is loaded from the database to perform a
parser.Stack.load, the raw_template should be prefetched to
avoid an extra sql query being performed.

However there are many calls to db_api.stack_get which do not need
to access Stack.raw_template, so the default behaviour is to
lazy-load it.

This change reduces the queries for a Stack.load from 3 to 2, so it
contributes to Related-Bug: #1306743

Change-Id: Ie6dad6ea4b1655a99e97a9ac2b7c00018406cd91
Give resource fakes a string ID

Resource ID values are actually UUIDs but unit tests assume
they are typed as integers.

This change uses the same numbers for test IDs but types them
as strings, which makes the resource fakes closer to real-world
usage.

Change-Id: I8c9d6889db6451019e3986729906b5a37188c133
Add glanceclient to heat

To enable implementation of a glance image resource, we first need to add
access to glanceclient in heat.

Change-Id: Ie0623e0307f6d3163ae584ceab89453f71f48053
Implements: blueprint glance-image
Merge "Update olso modules"
Merge "Stop periodic watcher tasks before deleting stack"
Make a top level contrib doc header

This is to just make it clear that there are other resources
besides Rackspace ones.

This is not really a bug as both the rackspace and docker
headings are the same level, but when going to the page it
is easy to see why the bug was made.

Change-Id: I76a8bcf63b7c976c4fcf0baecfd58e5fcbb65d96
Fixes-bug: #1311565
Merge "Engine changes for API param to show soft-deleted stacks"
Merge "API changes for param to show soft-deleted stacks"
Updated from global requirements

Change-Id: I805cbe40724a7669ed8e4f61f6afdd9528a43777
Make Server metadata a passive store again

This change reverts the software deployments change which polls
the deployments API whenever a Server resource metadata is read.

The Server metadata has reverted to being a standard resource
metadata store, and the deployments are pushed into this metadata
directly in the database whenever the deployments API is used to
create or update a deployment.

As part of the effort to not require a Stack.load for polling metadata
this change is for
Partial-Bug: #1306743

Change-Id: Ib461e1bab816d4b9e332786004c53a2f73d773e8
TestRandomString was calling the wrong setUp

Just incorrect usage of super(). This was bypassing HeatTestCase.setUp()
and causing extra logs to be printed.

Change-Id: I6f77cce53b971b14637e8705c3f73993ac458550
Partial-bug: 1281226
Merge "Make a top level contrib doc header"
Provides ability to reference existing neutron resources

Additional properties 'network' and 'subnet' are added to
the resources (existing properties 'network_id' and
'subnet_id' are deprecated). 'network'  and 'subnet' can
now carry name or id. Pre-existing neutron resources
can now be referenced in heat templates by their name
and not necessarily by their UUID. This would help porting
templates across deployments.

Change-Id: I644f5d6ee2e5ccabde190bd73eacc71daaf41f4d
Closes-Bug: #1286128