diff options
Diffstat (limited to 'nova/utils.py')
| -rw-r--r-- | nova/utils.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/utils.py b/nova/utils.py index 0c20dd34d..69011fb61 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -1259,6 +1259,11 @@ def generate_glance_url(): return "http://%s:%d" % (FLAGS.glance_host, FLAGS.glance_port) +def generate_image_url(image_ref): + """Generate a image URL from an image_ref.""" + return "%s/images/%s" % (generate_glance_url(), image_ref) + + @contextlib.contextmanager def logging_error(message): """Catches exception, write message to the log, re-raise. |
