Fix outdated comment in KeystoneClientV3.

This patch fixes the outdated class comment for KeystoneClientV3.

Change-Id: I7735dd8b2c672cf9e40d01a6a72fd90f1540352a
Resolve AWS::EC2::Instance AZ output to a value if not specified

The availability zone output attribute of the instance resource is
empty if no input is provided by the user for that property.
Instead of relying on solely user input to determine the value for this,
this attribute must be resolved to an appropriate value.

The VolumeTest.test_volume_default_az test case had an unmocked function
which is now mocked here to successfuly test this feature.

Change-Id: Iab2cf1f3da0261c30b755d0b87ebb693644a4a29
Closes-Bug: #1334519
Fixed adopt failure for stack with resource group

Added support to adopt a resource group and corresponding
unit test.

Change-Id: Icfeff0e30a9c4bd7fa0279e156709e078b81fcab
Closes-bug: #1353942
Associate floating IP with router interface

This change will create a dependency from a FloatingIP to a RouterInterface in
this template which interfaces with the same subnet that this FloatingIP's
port is assigned to.

It would be preferable to add the dependency based on matching FloatingIP
floating_network_id and Router external_gateway_info network, but there is
a valid use-case for the Router being external to the template, so the
dependency is matched on the internal subnet instead, which is available
from the RouterInterface property.

Change-Id: Iedff00b382b4fcda741ca5c9b4adc23b176ec48c
Closes-Bug: #1299259
Commit transaction on object delete

The postgres gate jobs currently have an intermittent failure
where a deleted resource shows up in the resource list.

This change does a transaction commit on object delete, which
brings delete behaviour in line with soft_delete behaviour
(soft_delete uses update_and_save, which also commits).

Change-Id: I5e1be4c197863fde3149c964f992ad816db88b7e
Closes-Bug: #1370865
Use six to translate exception message in tests

Use six to translate exception message in tests

Change-Id: I129de2f350ef31c6a8ef10355ada20d7789049a9
Add test to serialize and deserialize exceptions

Every subclass of HeatException is serialized and then deserialized.
For those classes which don't have a special init method, a generic
inspection is done to test each class. There are four exceptions
that are different, so their arguments are manually constructed.

Change-Id: I9bb21d134f8997c478cd4ee8ef0031e03b053204
Closes-Bug: #1304743
Merge "Fix outdated comment in KeystoneClientV3."
Convert parse error to text type

Some local environments (but not yet the gate) are experiencing
failure of InstantiationDataTest.test_format_parse_invalid_message.

This change fixes that test by converting the parse exception to
a text type before including it in the error message.

Change-Id: I06e271559e27452a7a0c1e8807a37bb5ed5df2fa
Closes-Bug: #1365880
Default port policy to force replacement

This change adds a replacement_policy property to OS::Neutron::Port
which defaults to always replacing the port on stack-update
regardless of any changes to the template.

Currently when a server is replaced, the new server is booted with
the port that is still attached to the old server, which raises a
port-still-in-use error.

Even if heat managed to detach and attach a single port, Nova currently
deletes all ports on interface-detach and server delete, so the port
would no longer be available anyway.

This change ensures that a new server is always booted with a new port,
so it fixes the above 2 issues, however there are implications for
other scenarios.

If the server is not replaced during the stack-update, the server
handle_update will detach/attach to the new port, so this is fine.

If the port specifies a fixed_ips ip_address which doesn't change
during stack-update, an error will be raised that 2 ports exist
with the same IP address. The only current workaround would be
to set update_policy:AUTO and not make any changes to the server
which results in server replacement (or do 2 stack updates using
a transition ip_address).

Likewise, update_policy:AUTO will need to be set on any port
consumed by resources which don't support update without replacement
(such as OS::Neutron::FloatingIP and OS::Trove::Instance)

Change-Id: I558db6bac196f49e5c488a577f0580c934b06747
Closes-Bug: #1301486
Related-Bug: #1158684
Related-Bug: #1369748
Merge "Use six to translate exception message in tests"
Imported Translations from Transifex

Change-Id: I19bfda97442507da24417228c0bdfa5ba979cf34
Merge "Convert parse error to text type"
Make sure that AutoScaling group has it's tag set correctly

At the moment we have to rely on the base classes metering.groupname
and this AutoScalingGroupName is effectively lost.

Change-Id: I6f4c099bde83fba5ad89e43297503943136b717e
Partial-bug: #1373247
Don't pass empty action strings to ceilometer

Note: this only really happens when using the cloud watch
resource template.

Partial-bug: #1373247
Change-Id: I084d28dfbbd0f2d7a6a18a09600f86880fa394d5
Pass the correct matching_metadata to Ceilometer

When using the Cloud Watch Resource Template don't really have
the json functions to prepend a prefix to the matching_metadata.

The issue here is the nova metadata get converted by Ceilometer from
"metering" to "user_metadata" so depending on the meter name we need to
search for different metadata.

Change-Id: Id3577c8af3f0433577b1ec7b5068585a74f4c3cc
Add an option to disable cloud watch lite

This also adds a deprecation warning.
This also changes the default to use Ceilometer.

Release message:
Anyone deploying Heat should not be using OS::Heat::CWLiteAlarm, but
OS::Ceilometer::Alarm.
CWLiteAlarm should be explictly disabled in /etc/heat/heat.conf by
setting "enable_cloud_watch_lite=false". This will stop Heat from
running a period task check for alarms.

DocImpact
Change-Id: I2a10c14772bdafc001e211d7e94502ac1f6b32b1
Closes-bug: #1322128
Merge "Add test to serialize and deserialize exceptions"
Improve error handling in api files

Change-Id: Ib9dccf5641d72aa5d16ad3179d0df030c7664fa6
Closes-Bug: #1364018
Fix couple tests in test_engine_service.py

- Function _validate_new_stack gets only Template objects so in test
  should pass correct object.
- Resources should be presented as dictionary, not list.

Change-Id: I264089c15680e97a2b5099f9ceee2a398eca592e