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
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
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
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
Remove dependencies on pep8, pyflakes and flake8

Hacking already pins them to the compatible versions,
so avoid running out of sync by letting hacking
determine the correct code checker versions.

Change-Id: I22151423b7884428d71de364ea81d6ec0a1fdafa
Fix order of arguments in assertEqual (patch 2/2)

Some tests used incorrect order assertEqual(observed, expected).

The correct order expected by testtools is
assertEqual(expected, observed).

This patch includes the other half of the files touched by these changes
(starting from test_n* plus contrib code) to ease the review.

Change-Id: I870386871581980abd796304dd91be0c662cb73e
Partial-Bug: #1259292
Fix OS::Neutron::Pool validation

Validation fails for resource OS::Neutron::Pool
if session_persistence property of VIP is set to None

Change-Id: Idb837c7660c8e140c4ff81ead41bb38c75577215
Closes-bug: #1270740
Make endpoint_type configurable

Allow to specify the endpoint type to use. Not everybody will
want to use publicURL, so let's make this configurable.

Closes-Bug: #1191109
Change-Id: I6f59fded9f9b70fd638ff17ed9fd4d7733cefac5
Add a new ThreadGroupManager class

Introduce a ThreadGroupManager class to manage active ThreadGroups for
engine services and move the thread-related EngineService methods to
ThreadGroupManager.  This will make it easier for multiple engine
services to manage thread groups.

Partial-Bug: #1262012
Change-Id: I1ce7785021726c274a294ef402b036540d395a29
Database model for software config/deployment

These database tables act as storage to SoftwareConfig
and SoftwareDeployment entities which are exposed via the
heat REST API.

There is no software_config_update as software config entities
are immutable after creation. This allows them to be created
outside any stack which uses them, and used by reference without
being concerned about their contents changing over time.

Implements: blueprint hot-software-config-rest
Change-Id: I9ff17f48dcd9605ff76f81007c559596234eac6e
Ignore tox -e cover generated files

The generated files are like '.coverage.idlerk.5365.021771', which can
not matched by '.coverage'. So change it to '.coverage.*'

Change-Id: Ie0bebceaaa15f2dcf145a708300654f8d3605271
Refactor heat gate testing contrib support

The existing code is running tests twice, one for heat, one for
contrib via adding two commands in tox.

This breaked tox single run. For example:

  tox -e py27 -- heat.tests.test_software_config

Except heat.tests.test_software_config is executed, all test cases in
contrib will be executed also.

The patch added contrib in discover list, which can make sure both
contrib in heat gate testing and does not break single test run.

Change-Id: I014d7b95c64287e1fd04a0ba69fce0de554a9a08
Fix adding heat_stack_user role via v3 API

A regression was introduced via 301a894 because it expects
keystoneclient functionality which is not yet merged/released,
so instead of passing the name to roles.list() we must filter
the results locally to lookup the role ID.

The lack of filtering support is a general issue with the v3
keystoneclient interfaces, so when it's fixed we can remove
this workaround.

Closes-Bug: #1271190
Change-Id: I1b29cc131496e4b19493a8cd8e6d4ed913db0938
Fix error in RS Auto Scale properties schema

The Rackspace Auto Scale resource's server networks property should be a
list of maps, not a map of strings.  The property description states
that the it is "Networks to attach to", so the property must be a list.

Change-Id: I6c53a895a820b934f2df7ead0f5732a636a4399d
Closes-Bug: #1270922
Document Heat terms in glossary.rst

blueprint heat-glossary
Change-Id: Iff1cc33c7f842a4f7c06697055b607dc41565207
Always specify preserve_ephemeral on server rebuild

Heat unit tests currently fail with git master novaclient. Without
this change all heat gating will fail as soon as novaclient 2.16.0 is
released.

Ideally the test mox should handle preserve_ephemeral being specified or not
but it is not obvious that this is possible. Novaclient rebuild has a kwargs
so always specifying preserve_ephemeral should not have any issues with
older novaclient.

Change-Id: Ieba9d19fefa77faf91b1d55bfbaa6797aeaa1fee
Closes-Bug: #1271367
Implement adopt-stack

Create a stack using user specified, already existing external
resources. The user specifies what resources to adopt using the
same serialization format as the one produced by abandon-stack.

Change-Id: I87b6d94780651143cd61fe95ee083e4310ad59c8
Implements: blueprint adopt-stack