summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonal Lafferty <donal.lafferty@citrix.com>2011-06-28 12:32:23 +0100
committerDonal Lafferty <donal.lafferty@citrix.com>2011-06-28 12:32:23 +0100
commit32b06d654922e08a53c6a4fc49fd2ad40e7a5d20 (patch)
tree7c2f6ecdb4ff0067ffc9e3d0cb71b038c2bd6d42
parent0a3b50d7b754af26b68f81617cab9aa588484362 (diff)
Revise key used to identify the SR used to store ISO images streamed from Glance.
-rw-r--r--nova/virt/xenapi/vm_utils.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py
index 0d08e459c..ede8114c4 100644
--- a/nova/virt/xenapi/vm_utils.py
+++ b/nova/virt/xenapi/vm_utils.py
@@ -984,12 +984,14 @@ def find_iso_sr(session):
sr_rec = session.get_xenapi().SR.get_record(sr_ref)
LOG.debug(_("ISO: looking at SR %(sr_rec)s") % locals())
- #TODO: use ['other_config']['il8n-key-iso-sr'] == 'local-storage'
- # or something similar to identify the iso sr
if not (sr_rec['content_type'] == 'iso' and
- sr_rec['name_label'] == 'Local ISOs'):
- LOG.debug(_("ISO: No match"))
+ 'i18n-key' in sr_rec['other_config'] and
+ sr_rec['other_config']['i18n-key'] == 'local-storage-iso'):
+ LOG.debug(_("ISO: SR with 'content_type' of 'iso' and"
+ " 'other-config' key 'i18n-key' of value"
+ " 'local-storage-iso'"))
continue
+
LOG.debug(_("ISO: SR MATCHing our criteria"))
for pbd_ref in sr_rec['PBDs']:
LOG.debug(_("ISO: ISO, looking to see if it is host local"))