~gnuoy/charms/trusty/neutron-api/kilo-neutron-dbmig

« back to all changes in this revision

Viewing changes to hooks/neutron_api_utils.py

  • Committer: james.page at ubuntu
  • Date: 2014-06-27 11:55:45 UTC
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: james.page@ubuntu.com-20140627115545-7le750qgwhc76z1a
Rationalize endpoint generation, rework tests, add support for multiple network support

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
    return API_PORTS[service]
73
73
 
74
74
 
75
 
def determine_endpoints(url):
76
 
    '''Generates a dictionary containing all relevant endpoints to be
77
 
    passed to keystone as relation settings.'''
78
 
    region = config('region')
79
 
 
80
 
    neutron_url = '%s:%s' % (url, api_port('neutron-server'))
81
 
 
82
 
    endpoints = ({
83
 
        'quantum_service': 'quantum',
84
 
        'quantum_region': region,
85
 
        'quantum_public_url': neutron_url,
86
 
        'quantum_admin_url': neutron_url,
87
 
        'quantum_internal_url': neutron_url,
88
 
    })
89
 
    return endpoints
90
 
 
91
 
 
92
75
def determine_packages():
93
76
    # currently all packages match service names
94
77
    packages = [] + BASE_PACKAGES