summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMotoKen <motokentsai@gmail.com>2012-10-22 16:32:22 +0800
committerMotoKen <motokentsai@gmail.com>2012-10-22 16:37:18 +0800
commit13ff1ea8f1aa81274f45cd0480ee5b7649fe03a6 (patch)
tree235abf92d43c90ae2cb85f1414a25dc4e75aaffc
parent8cb329b2a03f1d04f13c38244477e53ca4a321f0 (diff)
downloadnova-13ff1ea8f1aa81274f45cd0480ee5b7649fe03a6.tar.gz
nova-13ff1ea8f1aa81274f45cd0480ee5b7649fe03a6.tar.xz
nova-13ff1ea8f1aa81274f45cd0480ee5b7649fe03a6.zip
Use instance_exists to check existence
Use instance_exists instead of list_instances since commit 27c11c4bb4. Change-Id: I780e70f6b573a15e4acc71af16695e0db8ad2581
-rw-r--r--nova/compute/manager.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index c818ff855..51caf6275 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -2078,7 +2078,7 @@ class ComputeManager(manager.SchedulerDependentManager):
LOG.audit(_('Detach volume %(volume_id)s from mountpoint %(mp)s'),
locals(), context=context, instance=instance)
- if instance['name'] not in self.driver.list_instances():
+ if not self.driver.instance_exists(instance['name']):
LOG.warn(_('Detaching volume from unknown instance'),
context=context, instance=instance)
connection_info = jsonutils.loads(bdm['connection_info'])