Columns needs to be non-nullable for DB2

For DB2, we can not create constraints over nullable
columns. This patch makes some related changes to
035_event_uuid_to_id.py for Heat.

Change-Id: I6d251fa503848e03603a13ecb742d4915f0f6972
Closes-Bug: #1328045
Co-authored-by: Matt Riedemann <mriedem@us.ibm.com>
Fix DB2 column 'id' autoincrement issue

After installing heat against DB2, we can't insert data in table
event, the reason is that "event_table.c.tmp_id.alter(
sqlalchemy.Integer, autoincrement=True)" can't make sense after
above "tmp_id=>id" transformation, Now need work around it.

Change-Id: I50025fc5db87d458e660d42c773d799fc36f1b27
Closes-Bug: #1316041
Updated from global requirements

Change-Id: Ie4b40c04509a4a6956760eb9ec59fd14e958b722
Template not required on stack-adopt

With this change, template is not required on stack-adopt and
also parameters from the original stack are adopted.

Change-Id: Id5a28400bb8e27a3b852f12d9af4c2dc7c144725
Closes-Bug: #1300336
(cherry picked from commit 8c54f483189fef2799357457c3b1e8bc0f9e87c5)
Clean up signalling events after stack updates

We provide an Event object to every stack update in order to signal it that
we need to cancel the update; this change ensures that we delete it when
the thread is complete. Previously we were leaking memory on every update.

Change-Id: Ie0fbe3ec3ab57a2cb9dd5e551db15285b2b423c0
Closes-Bug: #1376857
(cherry picked from commit 6f13c2d0a4ff2004654a690c1e84a0c9d40ed577)
Don't send multiple update-cancel messages to an event

Change-Id: Ib64da11ed5584c1a2eef98378d3201a6949fac7d
Closes-Bug: #1376900
(cherry picked from commit 75242b9c67aafa80b4d4a13cfae6c50ba7f85b79)
Update translations for Juno

Change-Id: I9d429c042cc254b7659dcc5a06be1a645cc8bf06
Merge "Template not required on stack-adopt" into proposed/juno
Merge "Clean up signalling events after stack updates" into proposed/juno
Merge "Don't send multiple update-cancel messages to an event" into proposed/juno
Merge "Update translations for Juno" into proposed/juno
Add missing extra "greenthread" arg to remove_event()

See: http://eventlet.net/doc/modules/greenthread.html
the callback gets passed a "gt" arg.

Change-Id: I9bd44857662e45a1da2d4287017eb966dea8276d
Closes-bug: #1379072
(cherry picked from commit c73d607246b6bec3f5c79fdcee57adf5cfa3cc19)
Update references to auth_token middleware

There's references to the auth_token middleware in keystoncelient.
The auth_token middleware has been moved to keystonemiddleware and
the version in keystoneclient shouldn't be used anymore.

If these references aren't updated, then when options are changed in
keystonemiddleware.auth_token the heat-api will fail to start because
there's duplicate options in keystoneclient.middleware.auth_token.

Change-Id: I04573aa5ff967afe3e00329f797fcc71b779e7b3
Closes-Bug: #1379082
Do not attempt a stack update when it is deleting

If a stack is in any delete state(inprogress, failed),
don't attempt to update it.

Closes-bug: #1379113
Change-Id: I1de99702a385ac8ddeffc568270d2d3b51674323
Make sure that the properties are stored on updates

Previously properties_data was only stored on creation, now
this is getting passed to the update mechanism too.
Later we can look at reworking this into a single mechanism.

Closes-bug: #1377681
Change-Id: If3d476f34b9e61a3c99f63ba33734a875353c8fc
(cherry picked from commit d32370233eaf2a5c32888f269bd1dc5e0e787467)
Don't update a LoadBalancer under autoscaling control

Unfortunately, Autoscaling currently uses the update() method of a
LoadBalancer resource to do updates, with the result that the current
member list gets persisted (good) and used to compare in the event of
future *stack* updates (bad).

With this patch, we assume that LoadBalancers under the control of
Autoscaling will never have a members list property supplied in the
template.  We then ignore any updates to Autoscaling LoadBalancers that
don't actually modify the template.

The test changes revert the changes made in order to be able to merge
d32370233eaf2a5c32888f269bd1dc5e0e787467, before which LoadBalancers were
behaving correctly.

Change-Id: I9c02ab3d3dfbee0a8a90dd0ba345a5acdaf8a610
Closes-Bug: #1379619
(cherry picked from commit 7506d2c22fcd3d6e825ee660a4b20c5947cc7e9a)
stack delete fails when instance is soft deleted

In an environment where reclaim_instance_interval is set to
non-zero in nova, an delete request will only soft delete an
instance.(status=SOFT_DELETED, so that the instance can be reclaimed
if required by using 'nova restore <instance_id>')

Now in the above environment, when an delete stack is requested by
user, stack will hang until reclaim_instance_inerval or timeout.
Hence status=SOFT_DELETED for an instance should be handled by heat, which
this patch proposes.

Closes-Bug: #1377290

Change-Id: I86ea788131f113e3deb7aebfccecd7f5e4957ae5
Clarify snapshot deletion methods

There are two similar and confused things presented in code:
'handle_delete_snapshot' and 'handle_snapshot_delete'. In this patch
documenatation is updated to clarify current differences between this
two features.

Change-Id: I88997df97956cc36b071f116dd678df109e0f2de
Adding tests for sahara client exeptions

Currently sahara client has not any tests for common methods. This patch
adds missed tests and also sets exceptions_module variable.

Closes-bug: #1380563
Change-Id: I6b9482f585847ff32a1ca71ba383a19a33b6bddf
Make Rackspace Cloud DNS TTL constraints match API

The Rackspace Cloud DNS TTLs have a minimum constraint of 301, but,
according to the API docs, the minimum is "300 seconds or more".

Change-Id: I924889f859de4226d5e7517576e40d1fdbba3064
Closes-Bug: #1380755