57
57
neutron_api_context.NeutronPostgresqlDBContext(),
58
58
neutron_api_context.IdentityServiceContext(),
59
59
neutron_api_context.NeutronCCContext(),
60
context.SyslogContext(),
61
context.SubordinateConfigContext(
62
interface='neutron-plugin',
64
config_file=NEUTRON_CONF)],
60
context.SyslogContext()],
66
62
(NEUTRON_DEFAULT, {
67
63
'services': ['neutron-server'],
68
'contexts': [context.SubordinateConfigContext(
69
interface='neutron-plugin',
71
config_file=NEUTRON_DEFAULT)],
64
'contexts': [neutron_api_context.NeutronCCContext()],
74
67
def api_port(service):
123
116
resource_map = deepcopy(BASE_RESOURCE_MAP)
118
net_manager = network_manager()
120
# add neutron plugin requirements. nova-c-c only needs the neutron-server
121
# associated with configs, not the plugin agent.
122
plugin = config('neutron-plugin')
123
conf = neutron_plugin_attribute(plugin, 'config', net_manager)
124
ctxts = (neutron_plugin_attribute(plugin, 'contexts', net_manager)
126
services = neutron_plugin_attribute(plugin, 'server_services',
128
resource_map[conf] = {}
129
resource_map[conf]['services'] = services
130
resource_map[conf]['contexts'] = ctxts
131
resource_map[conf]['contexts'].append(
132
neutron_api_context.NeutronCCContext())
134
# update for postgres
135
resource_map[conf]['contexts'].append(
136
neutron_api_context.NeutronPostgresqlDBContext())
125
138
return resource_map
128
141
def register_configs(release=None):
129
release = release or os_release('neutron-common')
142
release = release or os_release('nova-common')
130
143
configs = templating.OSConfigRenderer(templates_dir=TEMPLATES,
131
144
openstack_release=release)
132
145
for cfg, rscs in resource_map().iteritems():