Revision d2cfb7a1 snf-common/synnefo/lib/services.py

b/snf-common/synnefo/lib/services.py
39 39

  
40 40
def fill_endpoints(services, base_url):
41 41
    for name, service in services.iteritems():
42
        prefix = get_path(service, 'prefix')
43
        endpoints = get_path(service, 'endpoints')
42
        prefix = get_path(service, ['prefix'])
43
        endpoints = get_path(service, ['endpoints'])
44 44
        for endpoint in endpoints:
45
            version = get_path(endpoint, 'versionId')
46
            publicURL = get_path(endpoint, 'publicURL')
45
            version = get_path(endpoint, ['versionId'])
46
            publicURL = get_path(endpoint, ['publicURL'])
47 47
            if publicURL is not None:
48 48
                continue
49 49

  
50 50
            publicURL = join_urls(base_url, prefix, version).rstrip('/')
51
            set_path(endpoint, 'publicURL', publicURL)
51
            set_path(endpoint, ['publicURL'], publicURL)
52 52

  
53 53

  
54 54
def filter_public(services):

Also available in: Unified diff