Remove ovs plugin support as this is going to be baked into charm

This commit is contained in:
Liam Young 2014-06-11 09:10:54 +00:00
parent 6abbaa59e6
commit 56fbfa3510
10 changed files with 56 additions and 51 deletions

View File

@ -1 +0,0 @@
neutron_api_hooks.py

View File

@ -1 +0,0 @@
neutron_api_hooks.py

View File

@ -1 +0,0 @@
neutron_api_hooks.py

View File

@ -1 +0,0 @@
neutron_api_hooks.py

View File

@ -1,7 +1,6 @@
#!/usr/bin/python
import sys
import uuid
from charmhelpers.core.hookenv import (
Hooks,
@ -69,7 +68,6 @@ def install():
@hooks.hook('config-changed')
@restart_on_change(restart_map(), stopstart=True)
def config_changed():
# XXX Changing rabbit-user leaves password broken
global CONFIGS
CONFIGS.write_all()
@ -233,20 +231,7 @@ def neutron_api_relation_joined(rid=None):
@hooks.hook('neutron-api-relation-changed')
@restart_on_change(restart_map())
def neutron_api_relation_changed():
CONFIGS.write_all()
@hooks.hook('neutron-plugin-relation-joined')
def neutron_plugin_relation_joined(rid=None, remote_restart=False):
rel_settings = {}
rel_settings['neutron_security_groups'] = config('neutron-security-groups')
if remote_restart:
rel_settings['restart_trigger'] = str(uuid.uuid4())
relation_set(relation_id=rid, **rel_settings)
@hooks.hook('neutron-plugin-relation-changed')
@restart_on_change(restart_map())
def neutron_plugin_relation_changed():
CONFIGS.write_all()
CONFIGS.write(NEUTRON_CONF)
def main():
try:

View File

@ -57,18 +57,11 @@ BASE_RESOURCE_MAP = OrderedDict([
neutron_api_context.NeutronPostgresqlDBContext(),
neutron_api_context.IdentityServiceContext(),
neutron_api_context.NeutronCCContext(),
context.SyslogContext(),
context.SubordinateConfigContext(
interface='neutron-plugin',
service='neutron',
config_file=NEUTRON_CONF)],
context.SyslogContext()],
}),
(NEUTRON_DEFAULT, {
'services': ['neutron-server'],
'contexts': [context.SubordinateConfigContext(
interface='neutron-plugin',
service='neutron',
config_file=NEUTRON_DEFAULT)],
'contexts': [neutron_api_context.NeutronCCContext()],
}),
])
def api_port(service):
@ -122,11 +115,31 @@ def resource_map():
'''
resource_map = deepcopy(BASE_RESOURCE_MAP)
net_manager = network_manager()
# add neutron plugin requirements. nova-c-c only needs the neutron-server
# associated with configs, not the plugin agent.
plugin = config('neutron-plugin')
conf = neutron_plugin_attribute(plugin, 'config', net_manager)
ctxts = (neutron_plugin_attribute(plugin, 'contexts', net_manager)
or [])
services = neutron_plugin_attribute(plugin, 'server_services',
net_manager)
resource_map[conf] = {}
resource_map[conf]['services'] = services
resource_map[conf]['contexts'] = ctxts
resource_map[conf]['contexts'].append(
neutron_api_context.NeutronCCContext())
# update for postgres
resource_map[conf]['contexts'].append(
neutron_api_context.NeutronPostgresqlDBContext())
return resource_map
def register_configs(release=None):
release = release or os_release('neutron-common')
release = release or os_release('nova-common')
configs = templating.OSConfigRenderer(templates_dir=TEMPLATES,
openstack_release=release)
for cfg, rscs in resource_map().iteritems():

View File

@ -17,6 +17,3 @@ requires:
interface: rabbitmq
identity-service:
interface: keystone
neutron-plugin:
interface: neutron-plugin
scope: container

View File

@ -0,0 +1,30 @@
# icehouse
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
###############################################################################
[ml2]
type_drivers = gre,vxlan
tenant_network_types = gre,vxlan
mechanism_drivers = openvswitch
[ml2_type_gre]
tunnel_id_ranges = 1:1000
[ml2_type_vxlan]
vni_ranges = 1001:2000
[ovs]
enable_tunneling = True
local_ip = {{ local_ip }}
[agent]
tunnel_types = gre
[securitygroup]
{% if neutron_security_groups -%}
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
{% else -%}
enable_security_group = False
{% endif -%}

View File

@ -2,16 +2,5 @@
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
{% if sections and 'COMMENT' in sections -%}
{% for key, value in sections['COMMENT'] -%}
# {{ value }}
{% endfor -%}
{% endif -%}
###############################################################################
{% if sections and 'DEFAULT' in sections -%}
{% for key, value in sections['DEFAULT'] -%}
{{ key }}="{{ value }}"
{% endfor -%}
{% else -%}
NEUTRON_PLUGIN_CONFIG=""
{% endif -%}
NEUTRON_PLUGIN_CONFIG="{{ config }}"

View File

@ -1,11 +1,6 @@
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
{% if sections and 'COMMENT' in sections -%}
{% for key, value in sections['COMMENT'] -%}
# {{ value }}
{% endfor -%}
{% endif -%}
###############################################################################
[DEFAULT]
state_path = /var/lib/neutron