Patch 044 migration to work w/ MySQL 5.6

With MySQL 5.6 setup to use UTF-8 for everything, the 044 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: I73932f69ff662ef5bb030b6516bd3d32507de658
Related-Bug: #1316646
Fixed resource errors logged at default log level

* Heat was logging resource failures traceback at default log level.

* Resources failing is a normal condition, and once a resource has failed,
heat has already reached one of the permissible state ex: CREATE_FAILED,
hence heat should not log the resource failures traceback in default log
level.

* Have made necessary changes to log resource failures traceback at INFO
level.

Change-Id: Ica27cac5a94734c2db08cee2e7fe31289169fec9
Closes-Bug: #1290565
Add controller and action debug message in wsgi.py

Add controller and action debug message before calling api
controller to provide much more debug message when debugging api.

Change-Id: Ia1d05a3fd3574a63571838b6eb60f4db5bfef7f4
Implement custom constraints for subnet/port/router

Implement custom constraints for subnet/port/router

blueprint neutron-custom-constraint
Change-Id: I2d463512b0c19bd02ef0629a38a97dddfd4a1cfe
Add backward compatibility for notification_driver

Declare additional entry points for notification_driver option to avoid
breaking existing deployments that may use deprecated values.

Change-Id: I4f6abc33d01bb434d8ea9895aea2bfe6324049eb
Closes-Bug: #1355250
Man page for heat-keystone-setup-domain

This patch adds a man page to the 'heat-keystone-setup-domain' utility.

Change-Id: I8f92b1296ab1f61039214d7fde4f7a2a236e8893
Closes-Bug: 1326483
Move CooldownMixin into separate file

CooldownMixin is a class that can be shared between OS and AWS
auto-scaling implementations.  This patch moves it to a shared
subdirectory.

Implements: partial-blueprint reorg-asg-code
Change-Id: I40e470460e84944d317f5b1772fc562abf62896d
Enable lazy translation on heat

Enable lazy translation in heat/__init__.py so that heat
exception message can be actually handled and translated.

blueprint i18n-messages

Change-Id: I009bd95ece44afb841d1732395d6a4769bc52f35
Silence urllib3 redundant logging.

This patch makes the default logging level of heat-keystone-setup-domain
to be WARNING and the 'urllib3.connectionpool' logging level to be
WARNING as well.

The intent is to remove unncecessary logging information from urllib3
library.

Closes-Bug: 1358093
Change-Id: I650e80aa1093c8c7e7c5dac3694d58139d2ec260
Provide access to outputs from OS::Heat::AutoScalingGroup

Allow get_attr on OS::Heat::AutoScalingGroup to return a list of
corresponding attributes from each of the base resources. For example,

  {'get_attr': ['my_asg', 'outputs_list', 'networks', '<network_name>', 0]}

will return a list of the first IP address assigned to each server in the
group. This is modelled on similar functionality in the
OS::Heat::ResourceGroup resource. Similarly:

  {'get_attr': ['my_asg', 'outputs', 'networks', '<network_name>', 0]}

returns a mapping from resource names to the corresponding IP addresses.

Change-Id: Ib9e830e0c54602ac456d64179e1df30f0778906d
Closes-bug: #1356544
Implement snapshot listing

Add a new HTTP API to list a stack snapshots, along with the new method.

blueprint stack-snapshot
Co-Authored-By: ala.rezmerita@cloudwatt.com

Change-Id: I59eb7e035c19d2734c89a79848dec35f4468a1a0
handle_signal to handle translated error msgs

Heat software config deployments, when they fail, in some
circumstances pass translateable Messages as their error output.

Patch converts messages to unicode rather than str.

Change-Id: Idd325c80b68a69d11cea306bd6980518f0948196
Closes-Bug: #1332355
Remove the unused doc path heat/doc

Resource doc generation has been moved to doc/source/ext.

Change-Id: I7709e9f98aac8de7619ab6eda8a5f8b0488af67c
Use empty list in list_join for validation

Calling list_join on the list of ResourceGroup's attributes in a
SoftwareConfig fails during template validation with:

ERROR: Property error : my_config: config "list_join" must operate on a
list

Closes-Bug: 1358831
Change-Id: I39d2da7a28ba53fbe3a95bff0198fa5c2f87aa3b
Use auth_token from keystonemiddleware

auth_token middleware in python-keystoneclient is deprecated and has
been moved to the keystonemiddleware repo.

Closes-Bug: #1342274

Change-Id: I1aadbe24db63eb2507b088cd53886d7f2e192cab
Avoid name clash between local variable and a module

stack_resource is an imported module and it's been used as
a local variable.

Change-Id: I0988f248f9a80cb893b8a5acded1a8168f5679ac
Use the template module to access the Template class

i.e. stop using parser.Template
this imports the template module as "templatem" to avoid
namespace clashes with the many local variables called "template".

Change-Id: I97cc893f630e46589ee71fc73c6bbbcaa86b3a62
Move neutron_utils functions to neutron client

All uses of neutron_utils functions have been migrated to using
the neutron client plugin version.

Functions in neutron_utils are deprecated and will be deleted in the
next patch.

Change-Id: I1b00485bddffcb6b9dba2ac770668dde9d6a0d70
Using neutron utils function from neutron plugin

This patch replaces calls in resources and tests to use the client
plugin methods.

File neutron_utils.py was deleted as unnecessary.

Change-Id: If0db1da7079a9bfc3208ff1b209653d1dc7de01d
Moving network_id_from_subnet_id to neutron client

Code for getting network_id from subnet_id is used in several resources.
So function network_id_from_subnet_id should be moved to neutron client
plugin, because it will allow to avoid strange references on
NetworkInterface resource.

Change-Id: I18dfb9a21fdca7a3d047c1cc2e8950bec9622d8c