Make context available during constraint validation

This makes context optionally available in properties and during
constraint validation, to be able to add more advanced constraints which
make API calls.

blueprint param-constraints

Change-Id: I6ec1d6bc952d82029638caea32567036e29e4881
tests remove test_heatclient unnecessary mock

The mock_ks_v3_client.users mock is not needed in this test.

Change-Id: I9f61da1c7203d7b42177ce78491a3963023318f9
New Event uuid column and autoincremental id

Re added the autoincremental id column for the Event table, and added a
new column to store the event uuid. The uuid will be exposed to the user
as the id of the event, but internally the event will be handled using
the value of the id column.

Change-Id: I43464c6079bf7631fda0c4ab112b8f874c6190a3
Co-Authored-By: chmouel@enovance.com
Closes-Bug: #1261883
heat_keystoneclient add support for stack domain projects

Adds support for creating projects inside the heat stack domain.

A new project will be created in the stack domain if the stack creates
any InstanceUser resource, and the "stack domain project" will then
encapsulate all users associated with resources in the stack.

Adds a new stack_user_domain option which will be used to specify the
name of the domain where heat will create the projects/users.

Change-Id: I7bb1830489baf5fb6761d7e1c914dc3ab0450181
blueprint: instance-users
Fix indentation errors found by Pep8 1.4.6+

As a preparation in order to switch to a newer
Pep8 version in the future, fix the indentation errors
that are missed by Pep8 1.4.5 due to bugs.

Change-Id: I44d1a5194633d2992215fd0d1b740dfd0863e6f1
Closes-Bug: #1267994
Restructure Rackspace resources

During doc generation, resources have their own templates and need
to be separate from non-resource modules.  This removes the ``heat``
``engine`` and ``plugins`` folders and moves all resources into a
``resources`` folder, effectively separating the custom Rackspace
Client from custom Rackspace resources.

Partial-Bug: #1271226
Change-Id: Idbdc8400d30e2e745a2dc1b2d2fa1b7cff50d57b
Reorganize docker-plugin for consistency

Package and Module names shouldn't have dashes in them, since it makes
it harder to import them (i.e. one cannot use ``import dashed-module``).

Also, moving docker resource under resources for consistency.

Partial-Bug: #1271226
Change-Id: I785b626a99516ebe6444296cf62a78dd96355060
Rename rackspace.rst to contrib.rst

Partial-Bug: #1271226
Change-Id: I1b5f848ef7f8da645ea57a0a30e7f9b86a4c866b
Merge "Make context available during constraint validation"
Handle API 500 response in OS::Nova::Server

novaclient raises a ClientException when a 500 response code is returned
from the Nova API.  Previously, this would cause the stack action to
fail.  Log a warning instead.

Closes-Bug: #1276517
Change-Id: I8f00d476c8d7166aca74fdcd3e0f2621c00d9802
Refactor _create_template to not rely on instances

The core of the _create_template logic in autoscaling.py is now in
a separate static method, _resource_templates. _resource_templates is
destined to be moved to another scaling module that is intended to
be used outside of the heat engine, so it won't have access to instance
objects.

Implements: partial blueprint as-lib

Change-Id: I0eda024c88534207daa71de2a8eb53738cdd89ef
Move resource_templates to heat.scaling

This introduces a new package for autoscaling code which is
intended for use outside of the Heat engine, and moves the
resource_templates function into a new module, heat.scaling.template.
The function hasn't been changed at all.

Change-Id: I78c420e7a188f2d14780a03b3ea220b9a5fbe86c
Implements: partial blueprint as-lib
Fix default raw_template files value in migration

This was causing the following error when trying to do a stack-list:
ERROR: Attribute 'files' does not accept objects of type <type 'unicode'>

Change-Id: Ideee81e44e85fcd8d8f3c9c196702a6c78e5adfd
Closes-Bug: #1277278
Merge "heat_keystoneclient add support for stack domain projects"
Merge "tests remove test_heatclient unnecessary mock"
Merge "Rename rackspace.rst to contrib.rst"
Merge "Restructure Rackspace resources"
Merge "Reorganize docker-plugin for consistency"
Merge "Handle API 500 response in OS::Nova::Server"
Don't raise MySQL 2013 'Lost connection' errors

cherry pick, including original commit message below from
oslo-incubator commit:

b4f72b2987d53bb434e3a833f06d70a2167f5efc

Closes bug: 1275838

Although this code error is part of the `ping_listener` tests, it was
missing from the list of known - and ignored - connection errors.

The code error 2013 refers to a connection lost during a query, see:
https://dev.mysql.com/doc/refman/5.0/en/error-messages-client.html#error_cr_server_lost

Without this error code, the session won't try to reconnect to mysql,
which makes `max_retries` useless.

Change-Id: Id8a1c0665468b503b092c4f01ffd40e2be9c6fa9