Patch 033 migration to work w/ MySQL 5.6

With MySQL 5.6 setup to use UTF-8 for everything, the 033 migration
will fail. This is because a VARCHAR(256) cannot be indexed in UTF-8
databases. In versions of MySQL before 5.6, this produced a warning and
a truncated, less-useful index. In 5.6 it was changed to an error.

We will reduce these columns further to 64 bytes in the model in a
subsequent fix. For now, we will just create the table with 64 character
columns on new systems, which will allow this migration to work properly
on mysql-5.6. There is no danger of overflow, as 64 chars is what Keystone
uses for them anyway.

Change-Id: I27b9c61828301ba8c392b3d316f656641af753bc
Closes-Bug: #1316646
Stop overriding CONF.default_log_levels per binary

Overriding CONF.default_log_levels means we loose some explicitly set
default values such as 'iso8601=WARN'. Also explicitly overriding
CONF.default_log_levels means that default_log_levels cannot be set in a
config file.

Change-Id: Ib5103b88ec3f9ccd9d516032c6a13dc2fa4bcb5e
Remove unused parameter name in validate_value

Previously validate method for parameters uses "name" for raising
specific error during validation in check_* methods. In patch
I4a1dc2e65e7b118347933bdf18aba49c058aa28b this code was replaced on
validate_constraints. However validate_constraints does not use "name"
parameter. So it should be removed.

Change-Id: I278bd7828ca3a27925d024d443a16a7f75fd6937
Adding own child_template for AutoScalingGroup

Resource AutoScalingGroup fails during preview, because it uses the
parent child_template function with an invalid property Size. So
AutoScalingGroup should have its own child_template with correct
properties. Also new method child_template is used during handle_create.

Change-Id: I0068c1eaf19464c39348823160b665f538fec583
Closes-Bug: #1322583
Unit tests: Check for lost resource after failed rollback

Check that when a new resource is added to a stack during an update and it
is unable to be deleted during rollback, that we do not lose track of it
but rather it remains in the template whence we can later attempt again to
delete it.

Change-Id: I83ebbc16c84561b69f9bdb8e7485de85b695c1b8
Related-Bug: #1330016
Implement swift client plugin

This moves the client creation code out of Clients._swift() into
its own client plugin.

Importing swiftclient exceptions from the plugin is an interim
solution until the client plugin mechanism provides a way of
handling client-specific extensions.

Swift is a core project, and python-swiftclient is a dependency,
so the import is now mandatory.

Change-Id: Ib2cff83096639855eaa1e05febbb4b490edd6250
Implement glance client plugin

This moves the client creation code out of Clients._glance() into
its own client plugin.

Glance is a core project, and python-glanceclient is a dependency,
so the import is now mandatory.

Change-Id: If61f2510344bf67b7e9aded1dc9d9cedf2426228
Implement neutron client plugin

This moves the client creation code out of Clients._neutron() into
its own client plugin.

Neutron is an integrated project, and python-neutronclient is a dependency,
so the import is now mandatory. Also any conditional code which skipped
if the neutron client was missing has been removed, since the presense or
absense of an installed neutronclient has no bearing on whether neutron
is installed on a given cloud.

Change-Id: Id9fdc50e80efe78731e21934ed9f2704cc3eb408
Implement cinder client plugin

This moves the client creation code out of Clients._cinder() into
its own client plugin.

Cinder is a core project, and python-cinderclient is a dependency,
so the import is now mandatory (including the volume_backups import).

Change-Id: I6b937422cd8e20fa620a7e875ae8b4c61e8f9cf8
Change help text for StructuredConfig.CONFIG property

Current help text 'serialized to the chosen format' is misleading
as it only converts to JSON. Hooks have the responsibility to
convert to the required format and use it.

Change-Id: Ic9df130193982c3a89330931812512e055a49029
Closes-Bug: #1339464
Fix error count for stack-list while show deleted

1.The count for stack-list is incorrect while show deleted.
  The count should include the deleted ones.
2.We should check the value of 'with_count', if the value
  is invalid, we should raise ValueError.

Change-Id: Ie1eef7a7ec63870ac28929bcadcd917bbc8d3203
Closes-bug: #1331383
Remove unused 'VERSIONS' definition

After making template formats pluggable in patch
5709e08f33406cdd40b0b4e6fbd7fd2b8008976e, the 'VERSIONS' is
unused in /hot/template.py, we should remove it.

Change-Id: Icfdc0ccd7159bd521d9fa1f5e62a8a757e12bbe7
Fix several misspells

Change-Id: I5bdac6ace595eb1ad67e8c3ab8ee34cd986ff167
Don't overwrite deployments metadata in Server resource

Currently, when metadata_update is called and local metadata has been
added for software deployments (e.g stuff not defined in the template)
we will silently discard the non-template-defined stuff when calling
metadata_update.

Arguably we are abusing the metadata section by pushing arbitrary additional
data into it but since that issue has already happened, as part of the
SoftwareDeployments implementation, the simplest fix seems to be to merge
the current and template re-resolved state of the metadata.

Change-Id: Id68d11b584734fbb828aabaca6cc75aab0f4ee4c
Closes-Bug: #1337772
Fix OS::Trove::Instance restore_point property

python-troveclient expects restorePoint to be a dictionary with a
"backupRef" key.

Change-Id: Ib4d83e82dcd5c012fdc12255a93682a6c2d9f47c
Closes-Bug: #1338626
Allow listing of resources and nested resources

This allows the engine to optionally include resources from nested
stacks in a resource-list up to `depth` levels below.  This number is
limited by `max_nested_stack_depth`.

Implements: blueprint explode-nested-resources
Change-Id: I43a5af25e74c7bfb32260f1616d36b311e0f2631
Fix H201 violations and re-enable gating

H201 got stricter in hacking 0.9, so fix new violations and
re-enable gating.

Change-Id: Ie79b04bc1ae2d4784318c19661584d02b7bee088
Implements: blueprint reduce-flake8-ignore-rules
Removed redundant code in stack preview, create.

The operations performed for stack preview is a proper subset of
those performed for stack create, but the code is repeated.
Avoided the redundancy by creating a method and having it called
from preview_stack and create_stack methods.

Change-Id: I53d9f10913fcb49aa3fdb841b1fc893b8e401e4d
Closes-Bug: #1337718
Fixing a typo

Just a simple fix for a typo in a comment.

Change-Id: Ie5c165b3775601680b28d0e85fee8e4082735ffe
Merge "Implement swift client plugin"