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
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
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"
Merge "refactor: extract _terminate_volume_connections"
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
pep8 fixes for nova-manage

nova-manage is now getting pep8 scanned, so these fixes
are needed to make things happy.

Change-Id: I68b1d17fc06c2b2580907eb950b6087e499d65f9
Merge "remove session parameter from fixed_ip_get"