libvirt: remove_logical_volumes should remove each separately

Currently, remove_logical_volumes() is trying to remove
all of the provided volumes path in a single lvremove command,
while retrying it several times.
This is causing the command to fail, when the deleted volumes
are reappearing in the next iteration of the retry loop.

Handling the removal of each volume separately
and raising an exception for volumes which failed to be removed.
This will increase the chance for individual volume to be removed.

Closes-Bug: #1282423
Change-Id: Ib25f5603929c3038716661a589a41116b4c48909
ec2: Convert instance_get_by_uuid calls to objects

Convert a couple uses of db.instance_get_by_uuid() to use the Instance
object instead.

Change-Id: I6c317c72661643d46ea0577d6efe87a24bf98b74
Make quota rollback checks more robust in conductor tests

The existing cold migrate tests in conductor were mocking out the quota
object's rollback method but not actually validating that the quota
object is constructed properly or that the quota.QUOTAS.rollback static
method was called with the correct project_id and user_id given the
context and instance being used.  This patches makes the tests more
robust by not just making sure a method is called but that it's called
correctly.

Related-Bug: #1296502

Change-Id: Ib367d728b6bd50998db32d235f41212d0f94a8f7
Make _get_compute_info() use objects

This removes a direct call to the conductor api for getting service
info and replaces it with an object call. We still need to convert
the compute nodes to primitives for the live migration compute info
blob, but once that is converted to objects, we should be good.

Related to blueprint compute-manager-objects-juno

Change-Id: Ic8213bac5ce4754bfc95d7b47e8b9d4a65dffcc6
Add with_compute_node to service_get()

Right now, a service_get() call cannot joinedload the compute_node
attribute. This means anything that needs that data has to trigger
a lazy-load. A subsequent change will depend on this.

Related to blueprint compute-manager-objects-juno

Change-Id: Ie537f30374280203ea153230cfa1a7aecfa5b891
Add get_by_service() method to ComputeNodeList object

This allows us to get the ComputeNode objects related to a single
Service, in the case of the many-to-one situations of baremetal
and vmwareapi. In order to avoid passing the whole Service over
RPC, this adds a non-remotable API in front of the RPC one that
takes a full service, but ends up only passing the ID.

Related to blueprint compute-manager-objects-juno

Change-Id: I995fa6948bda64d2f5d60f0c81270321133bbfa8
Make update_available_resource() use objects

This makes the update_available_resource() periodic task use
objects instead of direct calls to conductor.

Related to blueprint compute-manager-objects-juno

Change-Id: I39fe7cae852c60e0490a5b2f1a98a011ac8b8425
Convert poll_rescued_instances() periodic task to objects

This converts poll_rescued_instances() to use instance objects for
fetching the list of unrescued instances, and makes it call directly
to compute api instead of going through conductor. Now that
compute_api.unrescue() uses objects natively, we can avoid the
indirection through conductor, which makes it faster and reduces
messaging load.

Related to blueprint compute-manager-objects-juno

Change-Id: I68b2b57831048932277e1f4e388f8a1aa8309aff
Make aggregate host operations use Aggregate object

This removes use of the conductor aggregate host methods, which
can now be done on the aggregate object itself. This is only used
in the xenapi driver, and the tests validate the operation in the
database afterwards, so no test changes are required here. This
will allow us to deprecate those aggregate methods in the conductor
api.

Related to blueprint compute-manager-objects-juno

Change-Id: I78f8d0d9ad0dd73c5c52582940dd70db73522600
Merge "libvirt: remove_logical_volumes should remove each separately"
Merge "ec2: Convert instance_get_by_uuid calls to objects"
Revert "Fix network-api direct database hits in metadata server"

This reverts commit 79ab96e34ba5b8dd3e4e542dd3a7f65624b13367.

This commit broke the Nova metadata API when using neutron.

Change-Id: I6855b03f00492fdf51e18c0dcb0a73590a71b374
Closes-bug: #1307582
Merge "Make _get_compute_info() use objects"
Merge "Add with_compute_node to service_get()"
Merge "Add get_by_service() method to ComputeNodeList object"
Merge "Make update_available_resource() use objects"
Merge "Convert poll_rescued_instances() periodic task to objects"
Merge "Make aggregate host operations use Aggregate object"
Merge "Revert "Fix network-api direct database hits in metadata server""
Merge "Make quota rollback checks more robust in conductor tests"