Revision 51057b1a

b/snf-common/synnefo/lib/services.py
34 34
from copy import deepcopy
35 35
from synnefo.lib import join_urls
36 36
from synnefo.util.keypath import get_path, set_path
37
from urlparse import urlparse
37 38

  
38 39

  
39 40
def fill_endpoints(services, base_url):
......
79 80

  
80 81
    selected = sorted(found_endpoints.keys())[-1]
81 82
    return found_endpoints[selected]['publicURL']
83

  
84

  
85
def get_service_path(services, service_type, version=None):
86
    service_url = get_public_endpoint(services, service_type, version=version)
87
    return urlparse(service_url).path.rstrip('/') + '/'

Also available in: Unified diff