Revision 4080a1df snf-common/synnefo/lib/services.py
b/snf-common/synnefo/lib/services.py | ||
---|---|---|
35 | 35 |
from synnefo.util.keypath import get_path, set_path |
36 | 36 |
|
37 | 37 |
|
38 |
def fill_in_endpoints(services, base_url):
|
|
38 |
def fill_endpoints(services, base_url): |
|
39 | 39 |
for name, service in services.iteritems(): |
40 | 40 |
prefix = get_path(service, 'prefix') |
41 | 41 |
endpoints = get_path(service, 'endpoints') |
42 |
for name, endpoint in endpoints.iteritems():
|
|
43 |
version = get_path('versionId') |
|
44 |
publicURL = get_path('publicURL') |
|
42 |
for endpoint in endpoints:
|
|
43 |
version = get_path(endpoint, 'versionId')
|
|
44 |
publicURL = get_path(endpoint, 'publicURL')
|
|
45 | 45 |
if publicURL is not None: |
46 | 46 |
continue |
47 | 47 |
|
48 | 48 |
publicURL = join_urls(base_url, prefix, version) |
49 |
set_path('publicURL', publicURL) |
|
49 |
set_path(endpoint, 'publicURL', publicURL) |
Also available in: Unified diff