From 2bcca3959209707e5604948ceb70d039671ae002 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Mon, 7 Jan 2013 22:06:49 +0000 Subject: Move global glance opts into nova.image.glance Move the glance_host, glance_port and glance_protocol options into the nova.image.glance module. Also move the generate_glance_url() and generate_image_url() utility methods there since they're the only uses of the options outside of the module. blueprint: scope-config-opts Change-Id: I3beca1a65cdd902a94ddc1c512d79a4de635ef38 --- nova/api/openstack/compute/views/images.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/api') diff --git a/nova/api/openstack/compute/views/images.py b/nova/api/openstack/compute/views/images.py index 13662c546..6438f0aa9 100644 --- a/nova/api/openstack/compute/views/images.py +++ b/nova/api/openstack/compute/views/images.py @@ -18,7 +18,7 @@ import os.path from nova.api.openstack import common -from nova import utils +from nova.image import glance class ViewBuilder(common.ViewBuilder): @@ -117,7 +117,7 @@ class ViewBuilder(common.ViewBuilder): def _get_alternate_link(self, request, identifier): """Create an alternate link for a specific image id.""" - glance_url = utils.generate_glance_url() + glance_url = glance.generate_glance_url() glance_url = self._update_glance_link_prefix(glance_url) return os.path.join(glance_url, request.environ["nova.context"].project_id, -- cgit