106
107
context.SyslogContext(),
107
108
nova_cc_context.HAProxyContext(),
108
109
nova_cc_context.IdentityServiceContext(),
109
nova_cc_context.VolumeServiceContext(),
110
nova_cc_context.NeutronCCContext()],
110
nova_cc_context.VolumeServiceContext()],
112
112
(NOVA_API_PASTE, {
113
113
'services': [s for s in BASE_SERVICES if 'api' in s],
189
189
net_manager = network_manager()
191
# pop out irrelevant resources from the OrderedDict (easier than adding
193
if net_manager != 'quantum':
194
[resource_map.pop(k) for k in list(resource_map.iterkeys())
196
if net_manager != 'neutron':
197
[resource_map.pop(k) for k in list(resource_map.iterkeys())
200
191
if os.path.exists('/etc/apache2/conf-available'):
201
192
resource_map.pop(APACHE_CONF)
203
194
resource_map.pop(APACHE_24_CONF)
205
# add neutron plugin requirements. nova-c-c only needs the neutron-server
206
# associated with configs, not the plugin agent.
207
if net_manager in ['quantum', 'neutron']:
208
plugin = neutron_plugin()
210
conf = neutron_plugin_attribute(plugin, 'config', net_manager)
211
ctxts = (neutron_plugin_attribute(plugin, 'contexts', net_manager)
213
services = neutron_plugin_attribute(plugin, 'server_services',
215
resource_map[conf] = {}
216
resource_map[conf]['services'] = services
217
resource_map[conf]['contexts'] = ctxts
218
resource_map[conf]['contexts'].append(
219
nova_cc_context.NeutronCCContext())
196
if is_relation_made('neutron-api'):
197
[resource_map.pop(k) for k in list(resource_map.iterkeys())
198
if 'quantum' in k or 'neutron' in k]
199
resource_map[NOVA_CONF]['contexts'].append(
200
nova_cc_context.NeutronAPIContext())
202
resource_map[NOVA_CONF]['contexts'].append(
203
nova_cc_context.NeutronCCContext())
204
# pop out irrelevant resources from the OrderedDict (easier than adding
206
if net_manager != 'quantum':
207
[resource_map.pop(k) for k in list(resource_map.iterkeys())
209
if net_manager != 'neutron':
210
[resource_map.pop(k) for k in list(resource_map.iterkeys())
212
# add neutron plugin requirements. nova-c-c only needs the
213
# neutron-server associated with configs, not the plugin agent.
214
if net_manager in ['quantum', 'neutron']:
215
plugin = neutron_plugin()
217
conf = neutron_plugin_attribute(plugin, 'config', net_manager)
218
ctxts = (neutron_plugin_attribute(plugin, 'contexts',
221
services = neutron_plugin_attribute(plugin, 'server_services',
223
resource_map[conf] = {}
224
resource_map[conf]['services'] = services
225
resource_map[conf]['contexts'] = ctxts
226
resource_map[conf]['contexts'].append(
227
nova_cc_context.NeutronCCContext())
221
# update for postgres
222
resource_map[conf]['contexts'].append(
223
nova_cc_context.NeutronPostgresqlDBContext())
229
# update for postgres
230
resource_map[conf]['contexts'].append(
231
nova_cc_context.NeutronPostgresqlDBContext())
225
233
# nova-conductor for releases >= G.
226
234
if os_release('nova-common') not in ['essex', 'folsom']:
683
692
# XXX: Keep these relations named quantum_*??
684
if network_manager() in ['quantum', 'neutron']:
693
if is_relation_made('neutron-api'):
695
'quantum_service': None,
696
'quantum_region': None,
697
'quantum_public_url': None,
698
'quantum_admin_url': None,
699
'quantum_internal_url': None,
701
elif network_manager() in ['quantum', 'neutron']:
685
702
endpoints.update({
686
703
'quantum_service': 'quantum',
687
704
'quantum_region': region,