Fix NovaObject versioning attribute usage

A typo made early in the object prototyping process has meant that
all objects thus far have been exposing a version of '1.0' because
the base object has been using an attribute of 'version'. The
object implementations have been exposing a 'VERSION' attribute
with their desired version advertisement.

Since we are still relatively early in the process of deploying
objects, the impact from this should be relatively minor, although
it is important to get this fixed ASAP before any incompatible
object changes are made.

(cherry picked from commit 99cbfb3492c80ded53fa018fe5a0881f977dc407)

Change-Id: If9154dc663111f304f72ef7f6f37c465e84ff504
Closes-bug: #1239709
Open stable/havana

Change-Id: I1f59561b357c03866672c2d9576568a67630a033
Merge "Fix NovaObject versioning attribute usage" into stable/havana
Merge "Open stable/havana" into stable/havana
Fixes datastore selection bug

Currently the vmwareapi drivers will only select the first
available datastore it finds, even when there are other
datastores with capacity, it will fill one datastore completely
and then die.

Closes-bug: 1227825

Change-Id: I24f85114ea3f014950c27c0c91a6be352990d263
(cherry picked from commit 6c4b89a2ad51f92707acc01908b63bc507ad8fe7)
VMware: fix regression attaching iscsi cinder volumes

VMware drivers fail to attach a iSCSI backed cinder volume with an
error 'unable to find iscsi targets' because the underlying
retrieval api was updated to a newer version but not it's usage in
volume_util (see commit e331287cdd1300878bfb9bbb3630889370e5fa72).
This is a regression over Grizzly release.

Fixes: bug #1193980

(cherry picked from commit e70211ff89785fed6a868eaab723847833590502)

Change-Id: I14fe62ad98fd9161df3ce6c06160b2759a9e38b2
Fixes inconsistency in flavors list with marker

Flavors list with marker is supposed to use flavorid as the marker since this is
the only id attribute the users can see, but it was using id (the confusion was
probably caused by the fact that flavorid attribute shows up to the user as id).

The change on db unit test shows makes the bug evident, and justify the changes
on the filter_by criteria.

Fixes bug 1226698

Change-Id: I3ffa636febb63be796fffc94be6486bf74e8239b
(cherry picked from commit c2c0958ad768581cd0e92f88207430227cb6539a)
Fixes unicode issue in the Hyper-V driver

The XML string returned by the WMI API calls requires unicode
conversion before further processing, e.g. with ElementTree.

This affects the vhdutilsv2._get_vhd_info_xml method due to
the textual description. The issue came to light using the
host with Chinese locale, while not present on a en_US host.

Fixes bug: #1229671

Change-Id: I09435a205abfc8ae9470c53c5446cbb28dee0115
(cherry picked from commit c8c7c01d68b34b76ebe6c4b39f93915480c1ccea)
Merge "Fixes inconsistency in flavors list with marker" into stable/havana
Merge "Fixes unicode issue in the Hyper-V driver" into stable/havana
VMware: fix bug with booting from volumes

When booting from a volume without an image reference would cause
an exception.

Change-Id: Ib0302197b8d4f5e054a8c4426cb0dde7cb82842e
Closes-bug: #1235022
(cherry picked from commit 026843773b71ab0ac30abb36fe9eed92f5e11f7a)
Remove unnecessary "LOG.error()" statement

Removes apparent debug statement left in from
Ifd41886b9bc7dff01cdf741a833946bed1bdddc

Closes-Bug: #1239603
Change-Id: I9c5b9a6b2349a6c62bef2974ab3b0bb986533741
(cherry picked from commit 7ef98b44374945cd157b125a9b46ee5727d285fe)
Add notification on deleting instance without host

If an instance which does not have a host associated is deleted, the
corresponding notifications were not being sent. Fixed the issue.

Closes-Bug: #1211742

Change-Id: I56482ab38725e6f1ddfb14350637d329f35095b3
(cherry picked from commit bbab55c4da531e4695a6e3e577aaa4975f0fce79)
Fail quickly if file injection for boot volume

Previously if the user attempted file injection on a booted volume it
would fail and retry several times, which slowed down the instance
spawning.  Instead of attempting file injection, fail quickly, and
log a warning

Fix bug 1188543

Change-Id: I264540de736c2bcb92567826fe5ba672e1244ba2
(cherry picked from commit f59c2d64ac8f0523c587e23b2d1c59fdfe7ea131)
Fix getting nwinfo for Instance obj

This fixes the get_nw_info_for_instance() method in nova/compute/utils.

If an instance object has no 'info_cache' (means we lack an entry in the
instance_info_caches table for the instance), don't try to access the
'network_info' attribute.  Just return a network model with empty
networking information like the dict version of an instance would do.

Change-Id: Ib1f49f10cefeefc55a87fea69b6fbc772c978dca
Closes-bug: 1243291
(cherry picked from commit a907c2f06b65dca7c2c0ea6119fe649864c6de11)
catch exception in start and stop server api

this catches exception.InstanceIsLocked in start and stop
server api.

Closes-Bug: #1233026

Change-Id: Ibb882178ab0770837702d503ef88c6510072e33f
(cherry picked from commit aa8938d696e6e2ecf23709f748de825dc2d07fd0)
Merge "Fix getting nwinfo for Instance obj" into stable/havana
Make unshelve use new style BDM

Unshelving an instance requires recreating it, and since change
I5b9c3e2d959c602fa22f49db681da918ae0adcea, it is necessary to call
compute manager's _prep_block_device with new style BDMs.

This patch makes the conductor return new-style BDMs when unshelving the
instance.

Closes-bug: 1246412
blueprint: clean-up-legacy-block-device-mapping

Change-Id: I0ba9f53c31c4d5238319cfd09600ad64f298629e
(cherry picked from commit 7fb9fcc970324236267d893185b421e26b1cb1d9)
Fix setting backdoor port in service start

Previously if self.manager wasn't defined for a Service object but a
backdoor_port was specified then that particular service would not
start because it would try to set the backdoor port in an object that
didn't exist. This commit fixes setting the backdoor port only if
manager is defined when calling start().

Closes-Bug: #1243260

Change-Id: Ib0e709cfd0e299a3e010450b7eba6e92bc108e4e
(cherry picked from commit e5c96505c0b4eac51c0925dcb691f0a1699216ce)
Fix all scripts to honor the enabled_ssl_apis flag

Add logic to allow configuration of SSL for all the cmd scripts
that start a WSGIService

Change-Id: I921013d113081a91a3fe9bb574bae5cd7bb06bcc
Closes-Bug: 1237126
(cherry picked from commit 08c6664d8f36ef48f28bed9afbd4aae21f6eb2d5)