diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-07-26 19:20:24 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-07-26 19:20:24 +0000 |
| commit | fd5d3489f93effee45b3e629b8fb1908ca2d8709 (patch) | |
| tree | 921bf1448037fc739a220e6ca2f23cd43f416177 /nova/virt | |
| parent | 39a40142254d4dbad8dfe1509d92e7e9fdbb44fb (diff) | |
| parent | 0c59003b1cc2ce17e3215e6c69b0dc2407f1b38b (diff) | |
Merge "Refactor glance image service code"
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/xenapi/vm_utils.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 9d340861d..bfbffd8cd 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -560,7 +560,8 @@ def upload_image(context, session, instance, vdi_uuids, image_id): LOG.debug(_("Asking xapi to upload %(vdi_uuids)s as" " ID %(image_id)s"), locals(), instance=instance) - glance_host, glance_port = glance.pick_glance_api_server() + glance_api_servers = glance.get_api_servers() + glance_host, glance_port = glance_api_servers.next() # TODO(sirp): this inherit-image-property code should probably go in # nova/compute/manager so it can be shared across hypervisors @@ -916,8 +917,10 @@ def _fetch_vhd_image(context, session, instance, image_id): 'sr_path': get_sr_path(session), 'auth_token': getattr(context, 'auth_token', None)} + glance_api_servers = glance.get_api_servers() + def pick_glance(params): - glance_host, glance_port = glance.pick_glance_api_server() + glance_host, glance_port = glance_api_servers.next() params['glance_host'] = glance_host params['glance_port'] = glance_port |
