diff options
| author | Josh Kearney <josh@jk0.org> | 2011-09-20 15:21:06 -0500 |
|---|---|---|
| committer | Josh Kearney <josh@jk0.org> | 2011-09-20 15:21:06 -0500 |
| commit | c07b24cdd6606950b0a4fef730c277b499eb65f4 (patch) | |
| tree | cad418eadab027ee2285840233f62b58cb2d8b46 /nova/api | |
| parent | 13e346df0bc88279242ed1c56ad39b36a22c8a39 (diff) | |
Fixed unit tests with some minor refactoring.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/views/images.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/nova/api/openstack/views/images.py b/nova/api/openstack/views/images.py index c41123f5e..659bfd463 100644 --- a/nova/api/openstack/views/images.py +++ b/nova/api/openstack/views/images.py @@ -18,10 +18,7 @@ import os.path from nova.api.openstack import common -from nova import flags - - -FLAGS = flags.FLAGS +from nova import utils class ViewBuilder(object): @@ -174,7 +171,7 @@ class ViewBuilderV11(ViewBuilder): def generate_alternate(self, image_id): """Create an alternate link for a specific flavor id.""" - # TODO(jk0): This will eventually need to take SSL into consideration - # when supported in glance. - return "http://%s:%d/%s/images/%s" % (FLAGS.glance_host, - FLAGS.glance_port, self.project_id, str(image_id)) + glance_url = utils.generate_glance_url() + + return "%s/%s/images/%s" % (glance_url, self.project_id, + str(image_id)) |
