~ionutbalutoiu/charms/trusty/neutron-api/next

« back to all changes in this revision

Viewing changes to hooks/neutron_api_context.py

  • Committer: James Page
  • Date: 2015-01-13 09:19:48 UTC
  • mfrom: (70 trunk)
  • mto: This revision was merged to the branch mainline in revision 95.
  • Revision ID: james.page@ubuntu.com-20150113091948-2xyc9gnqoc1jkxma
Rebase on next

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
        ctxt['verbose'] = config('verbose')
97
97
        ctxt['debug'] = config('debug')
98
98
        ctxt['neutron_bind_port'] = \
99
 
            determine_api_port(api_port('neutron-server'))
 
99
            determine_api_port(api_port('neutron-server'),
 
100
                               singlenode_mode=True)
100
101
        for rid in relation_ids('neutron-api'):
101
102
            for unit in related_units(rid):
102
103
                rdata = relation_get(rid=rid, unit=unit)
126
127
        ctxt = super(HAProxyContext, self).__call__()
127
128
 
128
129
        # Apache ports
129
 
        a_neutron_api = determine_apache_port(api_port('neutron-server'))
 
130
        a_neutron_api = determine_apache_port(api_port('neutron-server'),
 
131
                                              singlenode_mode=True)
130
132
 
131
133
        port_mapping = {
132
134
            'neutron-server': [
134
136
        }
135
137
 
136
138
        ctxt['neutron_bind_port'] = determine_api_port(
137
 
            api_port('neutron-server'))
 
139
            api_port('neutron-server'),
 
140
            singlenode_mode=True,
 
141
        )
138
142
 
139
143
        # for haproxy.conf
140
144
        ctxt['service_ports'] = port_mapping