Implement handle_update for FloatingIPAssociation resource

1. modify the property "port_id" to be required.
2. Implement handle_update for FloatingIPAssociation resource, allows to
update FloatingIpAssociation with new port_id(and fixedIp if port has
multipleIps) and new floatingip_id.

Change-Id: Ie40669bee849d91ed93446dcf7f066fe6a5b2961
Implements: blueprint handle-update-for-floatingip
doc: generate a valid xml tree

This patch makes sure that the <emphasis> tags used in the resources
generator are embeded in a <paragraph>.

This change makes it easier to convert from docutils XML to docbook by
providing a valid XML tree.

Change-Id: Icd48d8cc6d868f484de895a07bd696e951884109
Define options for glance client

Add a clients_glance section in common config to be able to specify
dedicated options for accessing the glance service.

Change-Id: Ic2783cb04b8e4f081aad0f7f4a5789a283d43bfa
Closes-Bug: #1324950
Fix exceptions in update_stack

Updating an in-progress stack is not supported by Heat.  Previously, a
NotSupported exception would be raised.  This was not consistent with
other actions, such as abandon stack.  Instead, let StackLock.acquire
raise an ActionInProgress exception.  Suspended stacks will still result
in a NotSupported exception being raised if an attempt is made to update
them.

Closes-Bug: #1308109
Change-Id: Ic844b06cd654d7bd5d422bba81d1d8246a5d8dd0
Fix requirements_style_check on BSD platforms

On Linux, the sort command implicitly ignore non-alphanumeric characters
when sorting.  Since the '>' character has an ASCII value greater than
the '-' character, the following list will be sorted on Linux, but not
on a Mac:

SQLAlchemy>=0.7.8,<=0.9.99
sqlalchemy-migrate>=0.9.1

This makes sort explicitly ignore such characters and will keep the
tests consistent across different environments.

Closes-Bug: #1324945
Change-Id: I559ae4b4c3e2a7d190af9d4b1517dfaf23d114b1
Fix default template for AWS::CloudWatch::Alarm with Ceilometer

Existing template assumes certain parameters to be delimited
strings rather than lists and uses 'Fn::Split' to convert them
to list. However, delimitedstring representations of parameters
are by default converted to list for CommaDelimitedList types.
Also includes change for CommaDelimitedList to accept empty string.

Change-Id: Ib566f1d098c575a80c4f1a975eaaaac93d70af34
Closes-Bug: #1316842
Added field parameter identifying the custom validation

In the template file a field with custom constrain should
return in the parameter arguments a custom constrain value.

Change-Id: I7df56a840eabb2f8093ea82eb822a764e9267b40
Closes-bug: #1313835
Avoid double-initialisation of Resources

If a __new__ method returns an instance of its own class (including
subclasses), Python automatically calls the __init__ method on the instance
before returning it to the caller. Therefore, explicitly constructing a
subclass inside __new__ and returning it was resulting in __init__ being
called a second time. Instead, call object.__new__(), passing the subclass
that we want to instantiate.

Change-Id: I5f891fd97e4cabc6d4c39c5312a0185649702e75
Unit tests: Create resources with ResourceDefinition

Stop creating Resources with dicts that are snippets of templates, and
instead always use ResourceDefinition objects to create Resources.

Change-Id: I1587f1edf9b04f06bd435857d7c1ea2c1cc26058
Use ResourceDefinition in autoscaling

Compare resources using ResourceDefinition objects (which are both
comparable and hashable, and are independent of any one template format)
instead of passing around snippets of a template.

Change-Id: I3bb8bcd2ff54a699a901aac435a56b537d99e992
Handle HOT when converting Outputs to Attributes

When converting the Outputs of a provider template into Attributes of its
facade resource use the Template object (which translates the template into
a consistent, cfn-like format) instead of the raw template data, so that
HOT also works.

Also fixed an outdated (and therefore now misleading) comment.

Change-Id: Iba44ba56be3e1d756cdc01a2b6f4fba171a02057
Support passing a Template object to StackResource

The create_with_template() and update_with_template() methods of the
StackResource class previously took raw template data as an argument; this
change allows them to accept Template objects also.

Change-Id: I7af5d516d4d0c4085144ed53c962cfc6ca3c69bb
Allow a resource to be added to a template

Add a method that allows a ResourceDefinition to be inserted into an
existing template.

Change-Id: Ia418127d72d26a77d731f93cc0eb3a45d983cc82
Use add_resource() to build autoscaling templates

Instead of building nested templates for Autoscaling manually, use the
Template.add_resource() method to build them up programmatically.

Change-Id: Ie4d6a869355cf0ddb6fce0edc6c7d49b8a2b7e75
Merge "Define options for glance client"
Merge "Fix default template for AWS::CloudWatch::Alarm with Ceilometer"
Merge "doc: generate a valid xml tree"
Add auth_token_info to request context

The auth_token (and other) middleware adds a keystone.token_info value
to the request environment after validating the token.  We can pass this
value via the request context which allow us to avoid always re-requesting
another token in the keystoneclient instance in heat-engine.

Change-Id: Icac0e73fbddd5011fb41bd644036ba489189c405
Partial-Bug: #1317293
Merge "Fix requirements_style_check on BSD platforms"
Merge "Avoid double-initialisation of Resources"