From ff4194bec79067bf77ab25caec1e40ad3709ea07 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Wed, 19 Jun 2013 09:43:54 -0700 Subject: Make _poll_unconfirmed_resizes() use objects This makes the _poll_unconfirmed_resizes() periodic task use objects for looking up the instance state information. This patch also makes compute_confirm_resize() take instance objects. Although this method will be obsolete after a full conversion to objects, this makes it send a full instance object to the conductor manager, which is then converted to a dict for passing to compute_api (for now). This will allow a more complete conversion of the use of it to objects, and then the dict hack will be removed when the method itself goes away. Related to blueprint unified-object-model Change-Id: I03c1a28a1bbd9732f803e140e93d214dd5c7792e --- nova/compute/manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/compute') diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 0a6a9d08d..237831cd1 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -3707,8 +3707,8 @@ class ComputeManager(manager.SchedulerDependentManager): {'migration_id': migration['id'], 'instance_uuid': instance_uuid}) try: - instance = self.conductor_api.instance_get_by_uuid( - context, instance_uuid) + instance = instance_obj.Instance.get_by_uuid(context, + instance_uuid) except exception.InstanceNotFound: reason = (_("Instance %s not found") % instance_uuid) -- cgit