summaryrefslogtreecommitdiffstats
path: root/nova/scheduler/rpcapi.py
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-08-03 22:50:21 -0400
committerRussell Bryant <rbryant@redhat.com>2012-08-06 15:09:33 -0400
commit98f753d4c5e8bdf31716a7452f89930a51b3edf5 (patch)
tree1bf25777e0c38629dd9dc8017dd124c290acf86b /nova/scheduler/rpcapi.py
parent7677354e3ba0954158d33feef3667b0fe7dcc2a3 (diff)
downloadnova-98f753d4c5e8bdf31716a7452f89930a51b3edf5.tar.gz
nova-98f753d4c5e8bdf31716a7452f89930a51b3edf5.tar.xz
nova-98f753d4c5e8bdf31716a7452f89930a51b3edf5.zip
Send full instance to scheduler live_migration.
Remove the instance_id parameter and send a full instance dict to the live_migration method of the scheduler manager. This cuts down on some unnecessary database access in the scheduler. Part of blueprint no-db-messaging. Change-Id: Ic45105300c967c760559df2225e59e515cea8b7b
Diffstat (limited to 'nova/scheduler/rpcapi.py')
-rw-r--r--nova/scheduler/rpcapi.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/nova/scheduler/rpcapi.py b/nova/scheduler/rpcapi.py
index a553b202c..9965a162e 100644
--- a/nova/scheduler/rpcapi.py
+++ b/nova/scheduler/rpcapi.py
@@ -37,6 +37,7 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
- remove instance_type_id, add instance_type
- remove topic, it was unused
1.2 - Remove topic from run_instance, it was unused
+ 1.3 - Remove instance_id, add instance to live_migration
'''
BASE_RPC_API_VERSION = '1.0'
@@ -70,13 +71,14 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
return self.call(ctxt, self.make_msg('show_host_resources', host=host))
def live_migration(self, ctxt, block_migration, disk_over_commit,
- instance_id, dest, topic):
+ instance, dest, topic):
# NOTE(comstud): Call vs cast so we can get exceptions back, otherwise
# this call in the scheduler driver doesn't return anything.
+ instance_p = jsonutils.to_primitive(instance)
return self.call(ctxt, self.make_msg('live_migration',
block_migration=block_migration,
- disk_over_commit=disk_over_commit, instance_id=instance_id,
- dest=dest, topic=topic))
+ disk_over_commit=disk_over_commit, instance=instance_p,
+ dest=dest, topic=topic), version='1.3')
def update_service_capabilities(self, ctxt, service_name, host,
capabilities):