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
Showing member list for nested resources

New section 'members' was added for nested resource description. This section
contain physical_resource_id of nested stack resources.

Closes-bug: #1249484
Change-Id: Iff5647b92abcd9d6fc3b6e3f3e7379c3f5f95e79
Refactor software config db model to use LongText

Reuse the types defined in heat.db.sqlalchemy.types in software config
db model and versions migration to make code clean and consistent.

Change-Id: Iae7d5ec34413aedf8a38a3e22d22cacf4e031c24
Add heat.sqlite in git ignore list

SQLite file "heat.sqlite" will be generated during test cases
running. So it should be in git ignore list.

Change-Id: I31217e3de69a016fb4daa7e353161d58c71df98b
Add qpid-python to requirements

Qpid is a supported messaging library, and without this it is
necessary to install it manually in order to use Qpid in some
environments, notably the one used by TripleO.

Change-Id: I398c1d35295223cbc6969b386129c6fc9acbefc7
Closes-Bug: #1225191
Fix handle_create of NetDHCPAgent for updating

When NetDHCPAgent is updated with new network_id which is already
associated with the dhcp_agent_id, UPDATE_FAILED occurs in Heat. Fix
handle_create to check associating information to avoid this situation.

Closes-bug: #1272258
Change-Id: Ic827295e773d893d9af6d7cf1c687aee69e98298
Enabled source code coverage for contrib directory

So we can check the source code coverage status of contrib
directory. It's obvious to adjust omit and source properties in
.coveragerc. The tricky code in .testr.conf is caused by the behavior
of setuptools.

When running coverage, setuptools set environment variable PYTHON to
'coverage run --source package --parallel-mode' and call testr to run
the tests. The value specified via command line option --source will
overwrite the source value in .coveragerc. So contrib directory is
excluded from coverage run.

The change in .testr.conf removed the '--source heat' specified by
setuptools. So the source value specified in .coveragerc will be used
by coverage.

Change-Id: I92f6b058067ace3b3370a3670856ab3dc073b52f
API tolerate None environment string

If an API request has a None environment argument, we should not
reject the request, but treat it the same as an empty environment.

Change-Id: I812f308ef38833e89dfa2ce01263a297032f563a
Closes-Bug: #1273993
Purge remaining heat_keystoneclient v2 code

Removes the remaining v2 specific code, and converts the trust
handling code to use only the v3 client.

This completes the keystone-v3-only blueprint.

blueprint: keystone-v3-only
Change-Id: Iac5b7dd73f5827cc5247a3b71d63a0f5ea266628
HOT templates get_attr allows extra attributes

The HOT templates now allows the use of extra attributes for the
get_attr function. Wich this change is possible to traverse complex
resource attributes.

For example, getting an IP address for a server on a given network:

when the network name is stable, and always known:
get_attr:
- my_server
- networks
- public
- 0

or if the network name is something other than public:
get_attr:
- my_server
- networks
- get_param: my_network_name
- 0

If one of the extra arguments does not match with a key or a valid
index, an empty string is returned.

As a bonus track the Fn::GetAttr support was removed from the HOT
templates.

Change-Id: Ia7361fbd10611cc796bd90e781f4ae387c970dbd
Implements: blueprint hot-select
Merge "API tolerate None environment string"
Use a HeatIdentifier instance to create Parameters

This is the first commit in order to implement native pseudo parameters
for HOT templates.

Now to create a Parameters instance, a HeatIdentifier is used instead
of two variables (stack_name and stack_id)

Change-Id: Ifc914f8f6c943da73da5984452d424cf180b91e7
Implements: blueprint native-pseudo-params
Native Pseudo Parameters

This is the second patch in order to implement native pseudo parameters
for HOT templates.

The current pseudo-parameters (AWS:: ones) are now mapped to "native"
parameter names.

Now HOTemplate uses HOTParameters instead of Parameters in order to
set up correctly the stack id, which for the HOTemplates is an uuid and
for CFN templates is an arn.

Change-Id: I6361ef1aae55eee762c3f21c9c01ae6ca4a9ff01
Implements: blueprint native-pseudo-params
Closes-Bug: #1229415
Prevent access Parameters key in template dict

This is the third patch in order to implement native pseudo parameters
for HOT templates.

If someone needs to access to the Parameters section of a template, now
can use the parameters() method of Template/HOTemplate classes. In order
to enforce this as the only way of doing it, if the Parameters section
is access using the template as a dictionary an exception is raised.

Change-Id: Ia60b4d2393370b12bf2681b0985ce1cd6e91ac1a
Implements: blueprint native-pseudo-params
serialize non-string nova metadata

This patches ensures that non-string metadata values passed to Nova
are JSON-encoded. This permits setting metadata to complex values,
such as:

    instance0:
      type: OS::Nova::Server
      properties:
        metadata:
          internal_ip: {get_attr: [instance0_eth1, fixed_ips]}

Change-Id: I1a943876d805dce731771b18a39d0c78f617264a
Closes-Bug: 1274155
Only update_and_save if the stack exists

The following error can happen during a stack-delete:

  AttributeError: 'NoneType' object has no attribute 'update_and_save'

Only update_and_save the stack if it is not None.

Change-Id: I8c27ed6a461c699eba7da5bef8e879f1c0bdaf6b
Closes-Bug: #1274664
Merge "HOT templates get_attr allows extra attributes"
Merge "Use a HeatIdentifier instance to create Parameters"
Merge "Native Pseudo Parameters"
Merge "Prevent access Parameters key in template dict"