Support for nova client list hosts with specific zone

Implements one workitem of blueprint apis-for-nova-manage

This add an optional QUEY_STRING(zone=xxx) in /v1.1/{tenant_id}/os-hosts.
So we can also send /v1.1/{tenant_id}/os-hosts?zone=xxx now.
It will only return the hosts that availability_zone=xxx.

Change-Id: I89f2c0bf50f8ea1ef9f06da664f5c4b24098e5df
More robust checking for empty requested_networks

It's possible that requested_networks will be empty but not None.
Especially since novaclient defaults to an empty list.  This avoids
attempting an unnecessary validation.

Change-Id: I131dbb3f6cc6167e150d4a46386e6b0b51035579
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
xenapi: refactor: Agent class

Related to blueprint xenapi-config-drive

As config drive and agent are doing similar operations, part of the
config drive introduction, we would like to make the agent optional.
This refactor is introducing an agent class holding together the agent
operations, as a first step.

The steps were:
Introduce XenAPIBasedAgent
Added constructor parameters to XenAPIBasedAgent
get rid of parameters on get_agent_version
get rid of parameters on agent_update
get rid of parameters on set_admin_password
get rid of parameters on inject_file
get rid of parameters on resetnetwork
Correct newlines
add factory method for getting an agent instance

For the small changes, see:
https://github.com/citrix-openstack/nova/commits/agent2class

Change-Id: I3928c0776ff98c830c19487eb8ff7820e41ca025
details the reboot behavior that a virt driver should follow.

fixes bug 1000774

Change-Id: I5a1cd62181d6f3772b890006ae73113eee0a0e0e
remove session parameter from fixed_ip_get

Remove session parameter from public method fixed_ip_get.
This requires some changes to floating_ip_disassociate,
but doesn't appear to affect anything else.

Change-Id: I435bfc4f2f4175049fd164fea37b4724871e1eb1
Clean up quantumv2.get_client

Makes the get_client function more readable

Change-Id: I90a1e529308d0f52d1315e57cc412b40426d50a6
Ensures compute_driver flag can be used by bdm

Fixes bug 1063851 by moving compute_driver flag from
compute/manager.py to the global flags.py

Change-Id: I06891fd65550b63ffe83da18b6af41cf46938667
improve sessions around compute_node_*

Removed 'session' parameter from public method compute_node_get,
and replaced private calls with new method _compute_node_get.
Removed unused session paramter from other compute_node_* methods.

Change-Id: I943306be014b61d8818fdbe7891f6ad5ef934751
refactor: extract _terminate_volume_connections

Extract _terminate_volume_connections method, to remove code
duplication.

Change-Id: Ib9bede24d051700fe297fdd5a619f4a3a21bb88e
Merge "xenapi: refactor: Agent class"
Merge "More robust checking for empty requested_networks"
Merge "Support for nova client list hosts with specific zone"
Merge "details the reboot behavior that a virt driver should follow."
Merge "improve sessions around compute_node_*"
Merge "Ensures compute_driver flag can be used by bdm"
Merge "refactor: extract _terminate_volume_connections"
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
Remove database usage from libvirt check_can_live_migrate_destination

While libvirt is the only one that actually uses the compute host info
during this check, I think that it's an entirely reasonable thing to
pass to each hypervisor when doing the "can I migrate to this host"
check. Thus, I've added it excplicitly, without a gating check of
the capabilities.

Related to bp:no-db-compute

Change-Id: I7049879fcec3894165f1bece9beeb045ed78c94b