Use instance_get_by_uuid since we're looking up a UUID

Change-Id: I60869ace0890dcef887a7984e41abd9cf16ea9e3
This commit is contained in:
Johannes Erdfelt
2012-04-26 16:17:06 +00:00
parent 1c8b2fa663
commit ccd27e692f

View File

@@ -75,7 +75,7 @@ def find_orphaned_instances(session, verbose=False):
for vm_rec in _get_applicable_vm_recs(session):
try:
uuid = vm_rec['other_config']['nova_uuid']
instance = db.api.instance_get(ctxt, uuid)
instance = db.api.instance_get_by_uuid(ctxt, uuid)
except (KeyError, exception.InstanceNotFound):
# NOTE(jk0): Err on the side of caution here. If we don't know
# anything about the particular instance, ignore it.