baremetal: Add missing method to volume driver

Added get_hypervisor_version(), which is called by underlying
LibvirtVolumeDrivers. Also added tests roughly checking if the
underlying drivers can be loaded and be called without error.

Partial-Bug: #1208707
Change-Id: Ida6b6800d1ef518c6e76d6b2ab4ac2f795a744ca
Add V3 API sample for admin-password

Adds api sample tests and api samples for admin-password

Partially implements blueprint v3-api-unittests

Change-Id: Iade39ff931471d1d68e358ac5d35a1921e85df66
Adding support for multiple hypervisor versions

This is to prevent instances with newer tools from being provisioned
on older hypervisors.
Added comparison of hypervisor version from the compute-node and image
metadata in the image properties filter.
In host scheduler image_prop_filter, the 'hypervisor_version_requires'
image properties, if available, is compared to the host_state's
hypervisor_version, if available.
hypervisor_version_requires should be added on the image as metadata and
should have a operator and version value.
Examples : ">=6.0", ">6.0, <6.2", ""!=6.1"

Partially Implements blueprint xen-support-for-hypervisor-versions
Cell scheduler changes coming up in another commit.
DocImpact

Change-Id: I6fbf232adf9ac78ebb8ac2985739f163f4517d14
Hyper-v: Change the hyper-v error log for debug when resize failed

The error message is not sufficient enough for debug of hyper-v
when resize error occured, this patch adding the necessary info
in error log.

Change-Id: Ic8ecb8f08139face2c7bdca258de5e719d81833c
Closes-bug: #1238430
Add nova.db.migration.db_initial_version()

Updates Nova to use a new function called db_initial_version()
instead of the INIT_VERSION constant. This allows us to
move the top level INIT_VERSION = 132 into the
sqlalchemy migration.py implementation where it belongs.

Also, includes changes to do the same for the Nova
baremetal migrations.

Change-Id: I10dacdebb50d3121e3bfd094e40138807233aa64
Fix tests to work with mysql+postgres concurrently

Optimise tests.db.test_migrations and tests.db.test_migration_utils for
concurrency and make opportunistic tests obey walk_style configurations.

Closes-Bug: 1207750

Change-Id: Idb30f144fb67aefc58749897d774103c3c0ec640
Claim IPv6 is unsupported if no interface with IPv6 configured

When IPv6 is supported by glibc but no interface
is configured to use ipv6 (because the ipv6 module
is not loaded), skip ipv6 related checks.

Change-Id: I15aaf3d01f0f51bdc0bd29f30728ca2ab8b5c30a
Add DeleteFromSelect to avoid database's limit

nova-manage db archive_deleted_rows fails if max_rows is a large
number. Database has a limit of maximum sql variables in one SQL
statement. It is more efficient to insert(select) directly and then
delete(same select) without ever returning the selected rows back to
Python. This also can avoid database's limit.

Closes-Bug: #1214720

Change-Id: I29e3a5ce14c59dd2979e45e8d31fc3df04c70266
replaced e.message with unicode(e)

BaseException.message has been deprecated as of Python 2.6

Change-Id: I9ac936d707592cd627c57ce56ac67a8da7e55f39
Add ephemeral_mb record to bm_nodes

As the first step in making  baremetal support ephemeral partitions the
baremetal db needs to keep track of the ephemeral disk size.

Change-Id: I990f02a37799f4d9a3bde39a6058641a4a5314a4
Partial-Bug: #1238311
Add SecurityGroupRule object

This adds the beginnings of the SecurityGroupRule object, with
linkage back to parent and grantee groups. It is not currently
complete enough to serve as a full implementation, but provides
what we need for virt drivers.

Related to blueprint compute-manager-objects

Change-Id: I4099007c8d4e1c8deaa74cd001cb477a9f164261
Make InstanceInfoCache load base attributes

The InstanceInfoCache object is pretty bare-bones, previously needing
only the two main attributes. Since the virt/firewall module uses
the deleted flag, we need to load that now.

Related to blueprint compute-manager-objects
Related to blueprint virt-objects

Change-Id: I355a20b402c5581c1582cbe321c63bab58ee4815
Disable nova-compute on libvirt connectivity exceptions

The service will be disabled and re-enabled according to the success
or failure of establishing a connection to the libvirt service.

update_available_resources, periodic task, will probe the connection
even if the service is disabled.

This is in order to avoid migrations or new instances to be scheduled
on a disconnected from libvirt compute node.

Closes-Bug: #1240670
Change-Id: Ib8d67838ceb73c5b1cdc9498c17b335e9e5bb6f3
Merge "Hyper-v: Change the hyper-v error log for debug when resize failed"
Merge "Add SecurityGroupRule object"
Merge "Make InstanceInfoCache load base attributes"
Remove unused expected_sub_attrs

A leftover from a previous revision of the SecurityGroupRule object and
is now unused.

Change-Id: I21742e23fbd6477bd3d246d64124bbb571b40f94
Merge "replaced e.message with unicode(e)"
Merge "Disable nova-compute on libvirt connectivity exceptions"
Merge "Claim IPv6 is unsupported if no interface with IPv6 configured"