Standardize use of nova.db
We already mostly use: from nova import db instead of: import nova.db.api So change remaining few cases to use nova.db instead of nova.db.api. Help make code more uniform and easy to work with. Change-Id: I6183352c4bbe77b88a5b277788f588b0b48c6476
This commit is contained in:
@@ -73,7 +73,7 @@ def find_orphaned_instances(xenapi):
|
||||
for vm_ref, vm_rec in _get_applicable_vm_recs(xenapi):
|
||||
try:
|
||||
uuid = vm_rec['other_config']['nova_uuid']
|
||||
instance = db.api.instance_get_by_uuid(ctxt, uuid)
|
||||
instance = db.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.
|
||||
|
||||
Reference in New Issue
Block a user