Add migration method to test sqldump files

This is very useful for testing real migration issues from a mysqldump.
You use it like this:

    def _pre_upgrade_031(self, engine):
       _load_mysql_dump_file(engine, 'dump.sql')

Change-Id: I0d5680d42d608bdc1cb70ccdf19a4c867b372351
Using _handle_not_found_exception in resources

This patch replace duplicate code in neutron resources on
function _handle_not_found_exception defined in parent class.

Change-Id: I7f86f52a8d00590c83aad01bc26507c78f01ddbb
Closes-bug: #1267729
Don't query for resource during stack creation

In Resource.__init__, we unconditionally make a query on the resource
table even if the stack hasn't been stored yet and stack.id is None. The
patch adds a simple conditon to skip it.

Change-Id: Ic8f915d6bb82c95db0a65b029b09b864c1348f3d
New middleware to handle SSL termination proxies

The Heat API doesn't behave properly if it is behind an SSL termination
proxy. If this is the case, the HTTP redirections and the links
returned in the REST response bodies are build using http protocol
instead of https.

To handle this situation, a new middleware was added. The purpose of the
SSLMiddleware is to update the wsgi.url_scheme environment variable of
the request with the value contained in an HTTP header that can be
configured in heat.conf (by default: 'X-Forwarded-Proto')

Change-Id: I418cd8cf2fb2a5fb3f630b4945084fb6eab57310
Closes-Bug: #1235555
Use region for cinder management uri

Make the cinder client region-aware since Rackspace supports
more that one and needs to know in which region to deploy
volumes.

Closes-Bug: #1268706
Change-Id: Ibf7cf4fbabd1e11f798423b9ad2698e43cd46687
Use oslo crypto

Use olso crypto as the new encryption solution.

Change-Id: I80b76dc5acef5362c49c437bdefdf88f08983fc4
Closes-bug: #1251647
Fix ceilometer alarm properties schema

The patch contains the following changes:

Type changes:
 - evaluation_periods from String to Integer
 - threshold from String to Number
 - period from String to Integer

Next options are not required now:
 - evaluation_period
 - statistic
 - period
 - comparison_operator

Change-Id: I645673ca7bf52649322e3f4adf851145b9d1a244
Closes-Bug: #1261390
(cherry picked from commit ffc913cb930748e0cba0df5b485255d4ec41d5ee)
Adding Range constraint for SIZE property

Change-Id: Ie051a87df36632a1adf36f05ffb0a05d9115337f
Closes-bug: #1267747
Enable better sub-classing of common Schema class

This patch is first in a series of patches to unify the code for
property and parameter validation based on a common Schema class.

The current patch refactors the existing Schema class in
constraints.py so it will in a subsequent patch be easier to
sub-class it, i.e. to rebase the parameters schema class on it.

For example, sub-classes will be able to override uppercase/
lowercase spelling of data type names etc., which will save us
translation between CFN and HOT specifics in the engine.

Change-Id: I0418a00f045af590b17500716a74b8cc6ff72409
Partial-Bug: #1230229
Implements: blueprint schema-code-consolidation
Add a new "UpdateWaitConditionHandle" resource

On Update, the WaitConditions are not waited on if the count of unique ids
have already been satisfied before. If you have a setup which is watching
for changes and re-sending the signals then, it simplifies things for
the stack update to wait for these to be completed before moving on.

Change-Id: Ibfadc6f9c436ce3d0f468a4e5560233f762038dd
Refactor MySQL long text support

Seperate Json into two classes: LongText and Json. So type LongText
can be reused in both models and migration, for example, reused by
software config model(config).

Change-Id: If6a8f77e656ad17ee465cb4724d5e28962c0efef
Turn block_device_mapping.volume_size to int

Integer instead of string will allow better constrain implementation
plus Nova expects such parameter to be an integer.

This change is backward compatible, as it still accepts string values.

Change-Id: I599ea2bf77a187cc53f864a9e1a42755142211ff
Closes-Bug: #1267889
Convert heat_keystoneclient user-create logic to v3 API

Migrate the calls to create the stack user and assign the
stack user role to the v3 API (still using the default domain)

Change-Id: I34d07cd6c61aa7fccbd386f01504cb18a1f09803
blueprint: keystone-v3-only
Convert heat_keystoneclient user-delete logic to v3 API

Migrate the delete_stack_user function to use the v3 API.

While making this change, the old retry workaround (which
IIRC was due to a Folsom-era keystone bug) has been removed
as testing indicates it is no longer required.

Change-Id: I6e04ecc3efbb230952ee269f560bdce1115fb9ea
blueprint: keystone-v3-only
Convert heat_keystoneclient user enable/disable logic to v3 API

Migrate the enable_stack_user and disable_stack_user functions
to use the v3 API.

Change-Id: Ieebc94cf09ba952d0ec0499091ba52906d6fe9cb
blueprint: keystone-v3-only
heat_keystoneclient migrate auth_token/service_catalog to v3 API

These work the same regardless of the client version

Change-Id: I2ee4a90f4ca5c58226abd2a9660c1a7bdabb1a08
blueprint: keystone-v3-only
new method 'HeatTestCase.patchobject'

This patch introduce this method helper to use mockpatch from Oslo
and so benefit of mock and fixtures

Change-Id: Iac3c0d17a77f33b1ebf2ddc69db8237998947925
Fix incorrect resource types in docs/comment/code

The template guide documentation references OS::Compute::Server in several
places, and there are similar errors in the environment code comments and
environment test code. Also there is a similar issue with template guide
reference to Rackspace::Compute::Server, and a minor typo/spelling issue.

Change-Id: Iafbf405a328bdd8222c277efe5b52d7f8f589635
Closes-Bug: #1270078
Allow choice in how SignalResponder user id is stored.

Some subclasses of SignalResponder may assign a resource_id
with the real reasource that it creates.

With this change, the user_id is always stored in resource data.
If user_id resource data is missing an assumption is made that
this resource was created before this commit, so the
resource_id is used as the user_id.

Subclasses of SignalResponder which previously used the
user ID as their resource_id now need to call resource_id_set
themselves during handle_create.

Change-Id: Iac41ab99f8e9b0953b2cd447ff0e027443fabeca
Fix syntax error in docs

There are several syntax errors in docs.
The patch will add missing punctuation, remove extra whitespace, and
change the "heat-api-engine" to "heat-engine" in heat-engine.rst.

Change-Id: I67dcad5e0e0a1f71a67ab8fc4311d96db4820c29