Fix Instance deletion in unit tests

We need to actually return a NotFound exception from the nova client,
rather than just relying on it returning a status other than ACTIVE.

Change-Id: I1bb0d07db0ffb5c0ed780eb4ca7f5d7ddb98510e
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Wait for deletion of Instances during creation

When an Instance was still in the BUILD state when it was deleted, the
resource was not waiting for the instance to be deleted before declaring
success and moving on.

Change-Id: I05d553fedf10e01a06e20ca0e8ccbbbf463980e4
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Merge "Fix Instance deletion in unit tests"
Merge "Wait for deletion of Instances during creation"
heat engine : don't replace resource template before update

We want to validate the pre-update properties without touching
the existing template, because the resource implementation will
need to compare old/new json snippets to decide if a and update
can be performed or not.

ref blueprint instance-update-stack

Change-Id: I37ce6e799242819de6104a53f8458d8bbc3abf1c
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat engine : pass json snippet into resource handle_update

Change handle_update to accept the resource json_snippet,
needed to decide if a non-replacement update is possible
by comparing pre and post update resource definitions

ref blueprint instance-update-stack

Change-Id: I7eedce41eae232330f6fce4f098183cbd7fd6768
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat engine : add Resource update_template_diff method

Add method to top-level Resource class update_template_diff()
which allows us to determine the difference between old/new
templates for a resource update, and also raise an error
if the changed keys are not in the list of those defined
as supported for update by the resource

ref blueprint instance-update-stack

Change-Id: Ibef07a0cecbc15f7f1d6c2c663743e3af8023057
Signed-off-by: Steven Hardy <shardy@redhat.com>
Merge "heat engine : don't replace resource template before update"
Merge "heat engine : pass json snippet into resource handle_update"
Merge "heat engine : add Resource update_template_diff method"
heat engine : Support Metadata update for Instance resource

Allow Instance Metadata to be updated via UpdateStack

ref blueprint instance-update-stack

Change-Id: I7c2fd281650e0715c86bf63b8ab61114a9b81da8
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat engine : pass fully resolved template to update

We need to pass the fully resolved (static and runtime)
resource template into the resource update(), so the
resource can compare pre/post update templates properly

Change-Id: I2fba2fef9c9f9ccb9b7cde9bd24bd06af7659240
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat engine : don't treat UPDATE_COMPLETE as failure

The parser update logic currently treats UPDATE_COMPLETE
as a failure, which is incorrect

Change-Id: Ibac98fc08cdf3653be80cedfc3ed8ecb5c3eba8f
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat engine : WaitConditionHandle use creation time for timestamp

Use the resource creation time for the pre-signed URL timestamp,
otherwise you get a different timestamp/signature every time you
refer to the resource, which makes things like comparing templates
for update more difficult.

Change-Id: Ieb4a6269cfcaf1214c08442db03772fdd7570d59
Signed-off-by: Steven Hardy <shardy@redhat.com>