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
Add contrib to py26 and py27 gates

Change-Id: I6e3792bd1fa7076d51321d788d1c272b178339e1
Closes-Bug: #1251380
Add way to group exceptions in DependencyTaskGroup

DependencyTaskGroup currently aborts execution if any exceptions are
raised.  This commit provides a way of aggregating all the exceptions
during execution and re-raising them only at the end.

blueprint stack-check

Change-Id: I6af314cc112f9286c8b38739870c6fa8b4ba9b5a
Fix heat-keystone-setup error when try to create heat user

Unset OS_SERVICE_TOKEN and OS_SERVICE_ENDPOINT temporarily to make
sure this command can run even if the OS_SERVICE_TOKEN and
OS_SERVICE_ENDPOIN exist in shell environment.
Remove die_if_not_set in get_data function, because there maybe no
data in get_data function, for example, if the heat user does not
exist, the die_if_not_set will be in error.
Remove die_if_not_set after keystone user-list for the same reason.

Change-Id: I132f975ac2da21e6ad7431ae326ad9bd538e4696
Closes-Bug: #1266670
Add filter and pagination to stack_get_all

This change prepares the ground for calls that are not tenant-scoped
to make use of the filter and paging capabilities.

Implements: blueprint management-api
Change-Id: I4862752999629666b46da20c2713edc950c5d52e
Close SSH connections in Cloud Servers resource

Previously, it was possible that a failed stack or hung script could
cause an SSH connection to remain open.  This ensures that the SSH
connections are always closed.

Closes-Bug: #1267173
Change-Id: Ie31ddb8370349ad67c7f63916e6b3b202904da23
Implement neutron metering resources

Two new resources were added:
 - MeteringLabel
 - MeteringRule

These resources are realisation in heat neutron's
resources: metering-label and metering-label-rule.

Change-Id: I700dac3fa12d8202b873957542dba6ee1605c3e3
Implements: blueprint neutron-metering-resources
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
Fix comparison with singletons

Many plases in tests code use assertEqual(AA, None),
the same with True and False and negatives of such comparisons.

As comparison to singletons must use `is` operator, appropriate usage
is assertIs, assertIsNot, assertIsNone, assertIsNotNone

These assertions are provided by the `testtools` package,
so this change is not breaking backward compatibility with Python 2.6

This second patch inlcudes the other half of the files touched by these
changes to ease the review.

Change-Id: I9965ae158f3e0dc49b93b9357a32a302ac7dc735
Closes-Bug: #1259023
Add stack id and resource id in logs

Where applicable, the stack and resource id's will be added in the logs
that reference those stacks and/or resources.

blueprint log-resource-stack-id

Change-Id: I70958ddd4904d70ff26c7ad28e2f7fe951881198
Co-Authored-By: Daniel Givens <daniel.givens@rackspace.com>
Let Integer property convert strings to numbers

This patch give backward compability in case changing
properties schema of resources.
Now property Integer may try convert string to integer.

Closes-bug: #1267924
Change-Id: I8eeb482e1d2bdbb4afa1378a3d751c206658f23a
Added heat url in config for heat standalone mode

And use heat url for heat standalone mode in client heat.

Closes-Bug: #1255713

Change-Id: Ibbb0c53bd88b77b4444b652cebbd06034f69cebe
Add _() to rackspace resource strings

As part of fix to bug #1249217, all the translation strings were
included in _(), but rackspace resources were ignored.
This change is to fix translation strings in rackspace resources.

Change-Id: I2a422746693136636cc137e2e9cc1bd3a7e6bb01
Closes-Bug: #1261545
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
Merge "Add filter and pagination to stack_get_all"
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
Remove heat-cli-guide

The heat command line clients are documented now better in the
OpenStack End User Guide:

http://docs.openstack.org/user-guide/content/heat-stack-create.html
http://docs.openstack.org/user-guide/content/heat_client_commands.html

The content here is thus not needed anymore, as the README.rst says:
"This documentation should eventually end up in the OpenStack
documentation repositories `api-site` and `openstack-manuals`."

Change-Id: I297252d7f8eee383ce6252a5db44111630fbe29b
Merge "Let Integer property convert strings to numbers"