Allow user to specify image to use during rescue - V2 API changes

This commit includes the V2 changes.
Making changes in v2 API to take an extra parameter rescue_image_ref
as part of the rescue action API.
If specified, this image_ref will be used to rescue the instance.
If the image is not specified, then the base image ref is used by
default.

Partially Implements: blueprint allow-image-to-be-specified-during-rescue

DocImpact

Change-Id: I985b21264841a6a18a66d19ccd41753f78576776
Add info_cache as expected attribute when evacuate instance

Nova evacuates instance failed with neutron. The reason is
when nova-conductor try to get network info for instance, it
need instance include 'info_cache', but the instance dict which
passed didn't include it. This patch adds 'info_cache' as the
expected attribute for get instance.

Change-Id: I6f110c607e32b0ab536916741605b25d572331dc
Closes-Bug: #1284709
Don't overwrite instance object with dict in _init_instance()

If a compute service is started while it has an instance in task_state
REBOOT_STARTED or REBOOT_STARTED_HARD it will trigger an instance update
which will overwrite the instance object with an instance dict.  This
causes an AttributeError on the next line when instance.task_state is
referenced.  This seems like a simple oversight and should be switched
to using the instance.save method.

Change-Id: I44c3eab2c8821b66b0b9ef4696e56bd577ae8fed
Closes-Bug: 1309067
Remove unnecessary call to fetch info_cache

The _heal_instance_info cache() always accesses instance['info_cache']
therefore we should always load the info_cache so we can avoid the extra
query to fetch it.

Change-Id: I3c2e005b98abf2a80276562cc05e88ba5ff199bc
Closes-bug: #1309239
Remove utils.reset_is_neutron() to avoid races

If a unit test does not call utils.reset_is_neutron() when
it is complete, it may introduce a race condition because
the utils.is_neutron() value is cached to the old result.

This patch removes the utils.reset_is_neutron() and instead
makes sure that we never have a cached value for it.  It
also refactors _is_neutron out of vmwareapi.VMOps because
it cache the result unnecessarily.

Change-Id: I2440e308b00979b31c750513d14608808a295c33
Closes-Bug: #1309043
VMware: ensure rescue instance is deleted when instance is deleted

If the user creates a rescue instance and then proceeded to delete
the original instance then the rescue instance would still be up
and running on the backend.

This patch ensures that the rescue instance is cleaned up if
necessary.

The vmops unrescue method has a new parameter indicating if
the original VM should be powered on.

Change-Id: I3c1d0b1d003392b306094b80ea1ac99377441fbf
Closes-bug: 1269418
make ec2 errors not useless

The ec2 error log message on an unexpected exception doesn't
include the actual exception. From the best I can tell this is
because some time in the past the log message might also have
been returned to the user. However the current code builds the
user message completely separately.

We are tickling a bug on ec2 in the volumes stack that causes
"Unexpected KeyError raised", however without the stack trace it's
really hard to understand where this went wrong.

Change-Id: Ia0f9e6f957fa8788dc9e87631a10bc9631bb930b
Update version aliases for rpc version control

Now that Icehouse has been branched, add aliases for the rpc version
implemented by Icehouse.  These aliases can be used in the
configuration options for doing outbound rpc version control.

DocImpact - 'icehouse' is now a valid value to provide to all of the
options in the [upgrade_levels] section of nova.conf.

Closes-Bug: #1309334
Partial-Bug: #1309324
Change-Id: Iad96d8ba7e8e85346fe0b3275f220314bf76a7e3
Merge "Allow user to specify image to use during rescue - V2 API changes"
Merge "make ec2 errors not useless"
Merge "Remove utils.reset_is_neutron() to avoid races"
Merge "Don't overwrite instance object with dict in _init_instance()"
Merge "Update version aliases for rpc version control"
Merge "Remove unnecessary call to fetch info_cache"
Merge "VMware: ensure rescue instance is deleted when instance is deleted"
Imported Translations from Transifex

Change-Id: Iee4c48e0df819b09d32552736eecca2a7d6f9bad
Merge "Add info_cache as expected attribute when evacuate instance"
EC2: Add support for images to tags-api

Added EC2 'tags' support for images. The image metadata are used as
tags. We are excluding 'kernel_id', 'ramdisk_id', architecture,
'auto_disk_config' from the metadata while describe tags gets called.

Change-Id: I53240b87f2f371298ca96587b9ccbae0065a5014
Implements: blueprint ec2-tags-api-for-images
Merge branch 'bp/ec2-tags-api-for-images' of https://github.com/sandeep-kedari/nova