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
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
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"
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
XenAPI: Fix translation of metadetails in aggregates

https://review.openstack.org/#/c/43157/ added a translation from the sqlalchemy model to
the instance object replacing metadetails with metadata.

This added more traces in general for XenAPI (when we queried whether we were using
aggregates) and actually broke the host aggregate functionality

Change-Id: I87195753931945b6e1ecf75bc81575a6fa03068e
Closes-bug: 1232179
xenapi: post install scriptlet to rpm

A freshly installed XenServer requires some modifications in order to be
able to run OpenStack. Nova contains an rpm specification to create a
package with the dom0 plugins, however installing the rpm is not enough.
Some more actions need to be taken:
 - create /images, link to a directory within the local SR
 - setup an ssh keypair, and authenticate it with the host
This change adds a post script to the nova plugins rpm spec file, so
by installing the rpm on a XenServer, it is ready to run OpenStack, no
further manual actions needed.

Change-Id: Id57e3a3ab2782550468c6aa4c01059ceb7cc81ab