~ntt-pf-lab/nova/openstack-qa-nova-876120

« back to all changes in this revision

Viewing changes to nova/utils.py

  • Committer: Tarmac
  • Author(s): Josh Kearney
  • Date: 2011-09-21 18:27:23 UTC
  • mfrom: (1604.1.6 alternate_image_links)
  • Revision ID: tarmac-20110921182723-se16iuum3347cq1u
Adds an 'alternate' link to image views per 3.10 and 3.11 of http://docs.openstack.org/cactus/openstack-compute/developer/openstack-compute-api-1.1/content/LinksReferences.html

Show diffs side-by-side

added added

removed removed

Lines of Context:
910
910
    if not isinstance(lst, list):
911
911
        lst = [lst]
912
912
    return [{label: x} for x in lst]
 
913
 
 
914
 
 
915
def generate_glance_url():
 
916
    """Generate the URL to glance."""
 
917
    # TODO(jk0): This will eventually need to take SSL into consideration
 
918
    # when supported in glance.
 
919
    return "http://%s:%d" % (FLAGS.glance_host, FLAGS.glance_port)