xenapi: refactor: move UpdateGlanceImage to common

During the review of https://review.openstack.org/41651 it was
recommended to move UpdateGlanceImage to a common library. A bug was
filed to deal with the refactors. This change fixes the first part.

Fixes bug 1220596

Change-Id: I95ae89525b7e6768c5a70364945d5a10cb906d88
Adds V3 API specific urlmap tests

Adds V3 API versions of the urlmap unittests. These test that
the V3 content is returned when expected in the format expected.

Adds the extension plugin as being discoverage in the fake policy
files for the unitests to provide some easily known data to check
for the urlmap tests.

Updates extension info api sample tests

Partially implements v3-api-unittests

Change-Id: I67f2a3516ffee02b6dbf258ee35e1fd084ba060c
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
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
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
Merge "Remove obsolete redhat-eventlet.patch"
Merge "Fix conductor's object change detection"
Merge "Libvirt: add boot_index to block device info dicts"
Merge "Libvirt: make boot dev a list in GuestConfig"
Merge "Add Field model and tests"
Merge "Adds V3 API specific urlmap tests"
Merge "xenapi: refactor: move UpdateGlanceImage to common"
Merge "Make field object support transitional call-based interface"
Merge "Migrate Aggregate object to Fields"