summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorJosh Kearney <josh@jk0.org>2011-09-20 15:21:06 -0500
committerJosh Kearney <josh@jk0.org>2011-09-20 15:21:06 -0500
commitc07b24cdd6606950b0a4fef730c277b499eb65f4 (patch)
treecad418eadab027ee2285840233f62b58cb2d8b46 /nova/utils.py
parent13e346df0bc88279242ed1c56ad39b36a22c8a39 (diff)
downloadnova-c07b24cdd6606950b0a4fef730c277b499eb65f4.tar.gz
nova-c07b24cdd6606950b0a4fef730c277b499eb65f4.tar.xz
nova-c07b24cdd6606950b0a4fef730c277b499eb65f4.zip
Fixed unit tests with some minor refactoring.
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/utils.py b/nova/utils.py
index 81157a4cd..57c93d9d0 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -910,3 +910,10 @@ def convert_to_list_dict(lst, label):
if not isinstance(lst, list):
lst = [lst]
return [{label: x} for x in lst]
+
+
+def generate_glance_url():
+ """Generate the URL to glance."""
+ # TODO(jk0): This will eventually need to take SSL into consideration
+ # when supported in glance.
+ return "http://%s:%d" % (FLAGS.glance_host, FLAGS.glance_port)