Merge "Correct use of ConfigFilesNotFoundError"
Update log message for add_host_to_aggregate

When add host to aggregates with availability zone, if the host
is already in one availability zone, then the host cannot be added
to another availability zone.

When user do above operation, nova api will report error message,
but the error message does not include blank space between
<availability zone> and zone name, also the error message include
two periods.

The fix was adding blank space and removes one period for the message.

Change-Id: I7307288be194d3ce6de05b77433bbe2626ae46d9
Closes-bug: #1237303
Merge "Fix test_shadow_tables() on PostgreSQL/MySQL"
Merge "Fix FK violation errors in InstanceActionTestCase"
Fixes Hyper-V issue with VHD file format

The VHD format cookie signature needs to be checked in the footer
instead of the header as fixed format VHDs don't have a copy of the
footer at the beginning of the file.

Fixes bug: #1233853

Change-Id: Ibe44f0d895cde2edbc03dcd6ecebac24b0936660
Libvirt: add boot_index to block device info dicts

Block devices have a boot_index parameter, which is used to determine the
boot device.

This patch makes it part of the device_info internal libvirt driver
structure so that we can make use of it to do fine grained boot ordering
in subsequent patches.

Related-bug: 1229327

Change-Id: I23f2f7637a6ed023785a0ffde050fbd43402c655
Remove compute_api_class config option

This option was deprecated in Havana and can now be removed.  Its only
use was for changing out the API class if cells was in use.
Technically, it used to be possible to configure an arbitrary compute
API class.  However, that would have been an unsupported setup, and has
been completely broken since 9f902c7e17249cf5af1504f31d80c0247a02fe20
anyway.

As a part of this change, the cell_type configuration option needed a
default value.  I set it to 'compute'.  My reasoning was that you would
have more compute cells than API cells, so might as well set it to the
more common case.

Change-Id: I5ec44f84267a700da16b350e686eee886e0d1183
Libvirt: make boot dev a list in GuestConfig

In order to make boot order more flexible based on the block device
mapping passed, we need to customize the domain xml presented to
libvirt, by specifying more than one boot element. For more info see
http://libvirt.org/formatdomain.html#elementsOSBIOS. Currently the boot
element is hard coded to "hd" by the libvirt driver.

This patch makes it possible to specify more than one boot element that
will give us more flexibility.

Related-bug: 1229327
Change-Id: I38abe9edaa8f93469d58ad81a466f68c2c0d24d6
Libvirt: allow more than one boot device

This patch makes use of the boot_index information of block devices to
allow libvirt to boot from devices other than disks, and have more than
one boot device.

It does so by calculating the boot devices based on block devices type
and boot index, and then assigning the correct list to the GuestConfig's
os_boot_dev (that was made into a list in
I38abe9edaa8f93469d58ad81a466f68c2c0d24d6).

Closes-bug: 1229327
Change-Id: Ic33894cb818ee7c44579e6d00f273b40f669aa9b
Add a get_root_bdm utility function

Getting the root block device out of a list of block devices is a common
idiom and we use it in several places in our code base. This patch
factors it out in a handy utilty method and adds tests for it.

Change-Id: I4a2cb3c689fed9fbc0bc51ddba095e1269cacb2d
blueprint: clean-up-legacy-block-device-mapping
Move is_volume_backed_instance to new style BDM

Compute API is_volume_backed_instance used to rely on matching the
device name to the root_device_name field of the instance which had
several problems and edge cases.

Now that we have moved to the new BDM format that has the boot_index
and destination_type field for each block device - it is pretty
staightforward to implement.

Change-Id: Ia2c235f8bce577ed4ac6a480a4a051d159a5fad7
blueprint: clean-up-legacy-block-device-mapping
Merge "Fix incorrect exception raised during evacuate"
Merge "Sync three-part RPC versions support from Oslo"
Merge "Remove duplicated method in test_compute_api.py"
Remove obsolete redhat-eventlet.patch

See I62ce43a330d7ae94eda4c7498782a655e63747fa for the gorey details on
why this exists.

As of this fix:

https://github.com/eventlet/eventlet/pull/34

which was released in eventlet 0.13, we no longer need the patch.

This has now been removed from oslo-incubator, so this is really just
syncing that removal.

Change-Id: I84267f3c6726cb2e750f615e107c48b12c6ed353
Fix conductor's object change detection

Conductor was doing a copy.copy() on the inbound object to later
detect changes that should be sent back to the caller. This does not
copy things like Instance.system_metadata and thus is incapable of
properly detecting changes that should be tracked.

This patch makes conductor use obj_clone(), and imports Chris
Behrens' __deepcopy__ fix for objects so that deepcopy works.

Closes-bug: #1237102
Change-Id: I46ae8b0694dc31a90c1a5cdf76757d877877f072
Add Field model and tests

This adds the base for a structured field definition, which gets us
away from just using simple coercion functions to define our fields.
That gets messy and spreads code to coerce data apart from the
serialization and deserialization bits.

This aims to unify and better define our data types in objects.
Note that this change doesn't affect any of the *actual* format
of the fields, which is highlighted by the general lack of change
to the actual object tests as a result.

Related to blueprint structured-object-fields

Change-Id: I3bd8441f11c3bc599b9a6250d31ae1ece4165ecb
Make field object support transitional call-based interface

This makes the Field object able to be called like a function, which
emulates the old interface that objects are expecting. When all the
existing objects are converted to fields, we can fix the rest of
the infrastructure and remove this transition helper.

Related to blueprint structured-object-fields

Change-Id: I605a1e22d443137d850d4aa262a8bf8b93feabd7
Migrate Aggregate object to Fields

Related to blueprint structured-object-fields

Change-Id: I0d1fab1e05ee748b4c8e7ec15e91aaff5eac1fda
Migrate KeyPair object to Fields

Related to blueprint structured-object-fields

Change-Id: Ic1e4116a1ad4efb4b19d7501f7804acecbb02cb9