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
Let VlanManager keep network's DNS settings.

Lost piece of https://review.openstack.org/14560

Change-Id: I0376767f66041e2647fc2319ab3b2a339cdf7a19
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
Fix getattr usage

Class 'object' has no '__getattr__' member as pylint pointed out.
Use the getattr function.

Change-Id: I38c6075ac477e2fe33870bed64b0e5e986175305
Clean up quantumv2.get_client

Makes the get_client function more readable

Change-Id: I90a1e529308d0f52d1315e57cc412b40426d50a6
Add call to trigger_instance[add/remove]_security_group_refresh quantum

The calls to trigger_instance[add/remove]_security_group_refresh were
not being called in quantumv2/api. This patch adds those calls and also
removes the code previously required to handle the circular dependency which
is no longer there.  Fixes bug 1057069

Change-Id: Ia76d37ebf2546a26f893dcbc8d5a05f02324ad6b
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
Merge "Add call to trigger_instance[add/remove]_security_group_refresh quantum"
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"