Updated openstack/openstack
Project: openstack/nova  9506739c254f0423351d69fa414b7105acdef5d3

Enable terminate for EC2 InstanceInitiatedShutdownBehavior

The EC2 API supports an instance attribute called
InstanceInitiatedShutdownBehavior (IISB) which can be set to
'stop' or 'terminate' (default: 'stop').  When the instance
initiates its own shutdown, this determines whether or not
the instance hangs around in the Shutoff state or is
terminated by the system.

In nova, this is handled by the shutdown_terminate boolean.
IISB = stop      => shutdown_terminate = False
IISB = terminate => shutdown_terminate = True

sync_instance_power_state now invokes compute_api.delete if
shutdown_terminate = True and we detect the instance power state
has gone from Running to Shutdown.

Closes-Bug: #1131395
Change-Id: I284ae7a84384f19131703c4ad44e0e5f5b03f5d4