fetch_images() method no more needed

The Nova Glance wrapper returns all images metadata
if the parameter 'limit' is not define. It doesn't
split the image metadata list.

So the sub method fetch_image is no more needed.
We can delete it.

I added a check in Nova Glance wrapper to be sure
the parameter 'marker' or another one aren't set
to 'None' (like in bug #1065053).

Fixes LP bug #1070904

Change-Id: I24ecc4adf158401f60b508aa3a20bd4c91bfa92b
Clean up quantumv2.get_client

Makes the get_client function more readable

Change-Id: I90a1e529308d0f52d1315e57cc412b40426d50a6
Remove nose detailed error reporting.

Nosetests' detailed error reporting breaks when running testtools tests.
Disable this plugin to get proper error reporting.

Change-Id: I4898f567e8588e1dd61940486dfc515e459adc34
Clean up xenapi VM records on failed disk attaches

Breaks the create_vm_step up so that we can clean up the VM record in
case of disk attach failures.

Fixes bug 1073219

Change-Id: I54e28e2cce6fe4f29a03566eff998479410f7555
Fix VM deletion from down compute node

* free network resources
* free volume resources
* delete.start and delete.stop notifications added
* Handle network deallocate in multi_host mode

Fixes bug 1067214

Co-authored-by: Vishvananda Ishaya <vishvananda@gmail.com>
Change-Id: I0d4a7dc5836d39e405824528de214f23b214849f
Use env to set environ when starting dnsmasq

Explictly use env to setup needed environment variables for dnsmasq when
starting to avoid problems with subprocess mis-interpreting the first
command line argument as the executable name.

Also update DnsmasqFilter to accept any command that starts with env
followed by a set of args that include an equals sign, as long as the
next arg is the dnsmasq command.

fixes bug #1073253

Change-Id: I8ac08ba2d2309934a67ed2cb28049ed5d3277d63
refactor: extract method vm_ref_or_raise

Related to bp xenapi-volume-drivers

Imporve the code by extract method, and testing.

Change-Id: I8caca173266890bd99a360671e7af86759b89201
Force earlier version of sqlalchemy

Set the version of sqlalchemy to be earlier than the 0.8 beta as it
is incompatible with the latest available sqlalchemy-migrate and as
a result run_tests.sh does not run any tests.

Change-Id: I9c5515b76d35e4999f81d71e82f818685efe54ea
Merge "Fix VM deletion from down compute node"
Remove redundant code from PowerVM driver

This patch removes the dead instance cleanup from the
init_host() method in the PowerVM driver. Not only do
I think that it's redundant with the rest of init_host()
in compute_manager(), it's also examining the instance
task_state, which I think is a layering violation.

Tangentially related to bp/no-db-compute

Change-Id: Ie7eb4c07caa162f32021ccdbed51db950d30e2c7
Merge "refactor: extract method vm_ref_or_raise"
Merge "Remove nose detailed error reporting."
Add call to reset quota usage

There are certain circumstances where we may need to indicate an
uncertainty in a user's current usage of a given resource, thus
forcing a recount of those resources currently in use.  This adds
a QUOTAS.usage_reset() call which can be used to do this.  It
works by resetting the current usage to -1, which will force the
usage record to be refreshed the next time that user reserves
those resources.

Change-Id: I4a40c8edcc78ed9a7d18a293d4d7d6418b04b7f2
Merge "Clean up quantumv2.get_client"
Add scheduler retries for prep_resize operations.

Retry operations are subject to race conditions for compute resources.
prep_resize can race for resources on the destination host and
revert_resize can race for resources on the original source host.
This type of problem is handled for new instance build requests
by the resource tracker in compute.

As a first step to extending the resource tracker to cover resizes,
this patch adds scheduler retries around the prep_resize operation.

bug 1065267

Change-Id: I1b32c0a282772d9580e322b50990932016058329
Add rxtx_factor to network migration logic

Currently, when an instance is migrated from one host to another, the
only action the network API is able to take is moving floating IP
addresses.  We also need to be able to update the rxtx_factor value
to update QoS settings.  This change makes sure that the network APIs
will be passed the rxtx_factor value during a migration.

Change-Id: If4e1e96b84ee082c2d277c3d91da7df0325fc1ff
Merge "fetch_images() method no more needed"
Merge "Clean up xenapi VM records on failed disk attaches"
Fixes hypervisor based image filtering on Hyper-V

Fixes Bug #1073547

Nova scheduler's ImagePropertiesFilter based filtering requires the
"supported_instances" stat returned by the driver's get_host_stats method.
This fix implements the get_host_stats method, providing also some
refactoring in the process by adding a HostOps class.

Change-Id: Ia6e73eb3e8ff0be028854fe4fd6d8e305fa1d504
Merge "Add call to reset quota usage"