Adds get_console_connect_info API

Implements: blueprint hyper-v-rdp-console

Currently graphical console access to Nova instances is limited to
clients which are part of Nova itself (novnc, xvpvnc, spice-html5).
The mentioned clients verify the validity of a console access token
with the following private API:
nova.consoleauth.rpcapi.ConsoleAuthAPI.check_token

The usage of a private API precludes the possibility of employing
external graphical console clients, including FreeRDP-WebConnect, used
to connect to Hyper-V instances via RDP.

This change adds a public API method that wraps the aforementioned
check_token private API. This allows external clients to obtain the
necessary protocol connection information by providing a token
previously obtained with calls to get_vnc_console, get_spice_console
or get_rdp_console.

Includes V2 and V3 API implementations.

Change-Id: Idd1e4f57b16bd1488f3b72bb064cef51321a7c79
Merge "Make compute manager use Flavor object"
Use uuid instead of name for lvm backend

Because libvirt lvm volumes are based on instance['name'], it means
that the actual names used in lvm storage are based on an operator
configuration variable: instance_name_template (default is
'instance-%08x').

However this is site changeable, and changeable at any time. This
creates 2 failure modes.

1. Operator changes this, the result is all volumes created before the
change are no longer able to be cleaned up by nova

2. Operator has changed this to something that includes end user
input, like %(display_name), which would allow one user to impact
another (user A has display name "bob", user B has display name
"bob_joe")

This changes the lvm backend to use instance['uuid'] as it's
identifier which we know is unique, non overlapping, and not
changeable based on whims of site policy.

It also provides limited backwards compatibility for cleaning up old
disks if the installation was using the default template (which is
safe), otherwise it logs a warning about possibly leaking a disk which
will need to be manually cleaned up. That should be removed once we
open the Juno tree.

UpgradeImpact - while there is no operator action required to upgrade
over this change, if the nova install included a non default value for
instance_name_template then old lvm volumes will need to be cleaned up
manually after old guests are destroyed.

Change-Id: Ib36b962971fd1f66ea9a0818e91fec59e118e686
Closes-Bug: #1285735
Merge "Make resource_tracker use Flavor object"
Merge "Update Oslo wiki link in README"
Make restore_instance pass the Instance object to compute manager

The compute/api code already receives and uses an object, but
converts it to a dict before sending it down. This plumbs the
instance object all the way through to the driver.

This also converts the old compute_api non-unity test to a
proper unit test in test_compute_api, per usual when converting
API calls to objects.

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

Change-Id: Ic2d7d14c50d85556ed1170f7d026c9d84423c876
Deprecate conductor instance_type_get() and remove from VirtAPI

The flavor_get() in VirtAPI and instance_type_get() in conductor are
no longer needed by the virt drivers. This patch deprecates the
function in conductor's API and removes it everywhere else.

Related to blueprint compute-manager-objects

Change-Id: I782ee449df98a198f625b946c650ebff56711b8e
Make compute manager use InstanceInfoCache object for deletes

This patch makes compute manager use the InstanceInfoCache object
that is already in the instance to delete the cache while deleting
the instance.

It also fixes two tests that were still passing non-object
instance dicts to the method, which wasn't reflective of reality.

Related to blueprint compute-manager-objects

Change-Id: I829bd2d3828c01c18f3479375bea22e7f4be9d97
Merge "Add pack_action_start/finish helper to InstanceAction object"
Merge "Introduce Guru Meditation Reports into Nova"
Merge "Re-Sync oslo-incubator fixtures"
Merge "Use oslo-common's logging fixture"
Restore get_available_resource method in docker driver

The get_available_resource method, a necessary public
method was marked as private and it snuck through
code review! We caught this with docker-ci, but
only after it was merged.

This patch makes get_available_resource a public
method again, removing the _ prefix.

This is a partial revert for change:
    58d7eeede1e2912ab250fd306c85ca1a05de2fbc

Closes-Bug: 1286457

Change-Id: I07cede8e1ebf606988aeec5bb4d65a9c5ebfe20b
Merge "Use uuid instead of name for lvm backend"
Merge "VMware: fix datastore selection when token is returned"
Merge "Make restore_instance pass the Instance object to compute manager"
Merge "Deprecate conductor instance_type_get() and remove from VirtAPI"
Merge "Make compute manager use InstanceInfoCache object for deletes"
attach/detach interface should raise exception when instance is locked

when instance is locked, exception should be raised if attach and
detach an interface operation is performed. This patch add instance
lock check for the 2 APIs, catch and process the exception at API layer.

Change-Id: I6c0b05dafb9d480c8f0002bcc8306cb65a32aaf7
Closes-Bug: #1275741
VMware Driver update correct disk usage stat

The nodes managed by VMware VCDriver driver can have multiple
datastores (disk abstraction) attached to it. The driver currently
reports the disk usage of a datastore that has the largest capacity.
But it doesn't report a consolidated disk usage. As a result, the
node's storage capability is under-reported in many occassions.

This patch fixes this issue by aggregating the disk freespace,
capacity from all attached datastores.

Closes-Bug: #1220459

Change-Id: I818a041f33a045773fc799de2c69628064ef8cbf