baremetal: Move tests under tests/virt/baremetal

Change-Id: Ie066d5d4f53bc33338e160971af99ef637de7ad1
Make it easier to add namespaced rpc APIs.

Add an additional argument to the base create_rpc_dispatcher() method.
When a manager wants to override create_rpc_dispatcher() to add more
callbacks in their own rpc namespaces, it can just call the parent class
with the additional APIs to include.

Change-Id: I9cba8b176b35f55ba9d71365d0a8bf25d2ae311f
libvirt: Moving tests under tests/virt/libvirt

Change-Id: I8adfbb48fa0b05f999618b9f17cbca2b3ea04c93
Merge "Use prettyxml output"
Merge "libvirt: Moving tests under tests/virt/libvirt"
Merge "baremetal: Move tests under tests/virt/baremetal"
get_instance_security_groups() fails if no name on security group

The following patch fixes a bug in get_instance_security_groups() where
it tries to access security_groups['id'] but security_groups is a string.
This patch also removes some stubs that were not needed in a few unit test.

Fixes bug 1182738

Change-Id: Ia64db2e40d4a0e163344b4234112dbde71b1e132
Optimize SecurityGroupsOutputController by len(servers)

The following patch adds an optimization for _extend_servers() so that
it calls get_instance_security_groups() when len(servers) == 1, and
get_instances_security_groups_bindings() when > 1. In addition, this patch
adds a return statement if not len(servers) as there is no reason to
perform a query if there are no servers.

Fixes bug 1182730

Change-Id: I149bf32176d60e72d76576168d15995f7215b657
Don't update API cell on get_nwinfo

Every call to get_instance_nw_info() updates an instance's info_cache.
The purpose of this is to make sure we're constantly healing the
info_cache table.  However, this causes a lot of unneeded updates
traveling up to the API cell.  Cells has its own periodic task that
heals all instance data.

Fixes bug 1180304

Change-Id: I07774712a6358999fd1fdd0f5a90c6f05e3d8d6e
Add missing tests for nova.db.api.agent_build_* methods

blueprint db-api-tests

Change-Id: If8f8a3f02bc0ea73b9174caad60107c7d87f62c0
Raise AgentBuildNotFound on updating/destroying deleted object

Methods below should raise an exception when attempting to operate
with deleted AgentBuild objects:

 nova.db.sqlalchemy.api.agent_build_destroy()
 nova.db.sqlalchemy.api.agent_build_update()

Fixes: bug 1181967

Change-Id: If6df202afb7ea41634c35f7a52988e19677f4d65
Adds live migration support to cells API

Fixes bug 1153087

DocImpact: Cells now allows live migration within a cell,
but not between cells.

Change-Id: Ic8777c376883eaf6ff9cb4b379e0bacbfe5635b7
Merge "Fix resize when instance has no image"
Merge "Adds live migration support to cells API"
Using unicode() to handle image's properties

Replace str() to unicode() to allow nova-api work well with the fix I
did in glanceclient (https://review.openstack.org/#/c/29245/6).

Fixes: Bug #1180377

Change-Id: I31e532bb50e12e355b9dd26c9ce1e129da858cbe
Signed-off-by: Zhi Yan Liu <lzy.dev@gmail.com>
Merge "Don't update API cell on get_nwinfo"
Merge "set ERROR state when scheduler hits max attempts"
Catch InstanceNotFound in instance_actions GET

Catch the InstanceNotFound exception in the instance_actions
index function and handle the error gracefully so a stacktrace is
not generated in the log files. This patch does not change the
API

Fixes bug 1182867

Change-Id: I0764f8abda7176deefe0d103bd86acd0af78780d
Removed session from fixed_ip_*() functions.

Removed session objects from public fixed_ip_*() functions
in nova/db/sqlalchemy/api module. Minor code refactiring.

blueprint db-session-cleanup

Change-Id: Ic2a96270745799496e365aee0380ac079e1edeff
Merge "Catch InstanceNotFound in instance_actions GET"