Add initial support for ml2 driver

This commit is contained in:
James Page 2013-12-17 16:38:21 +00:00
parent 574eccee3b
commit ca2797179c
2 changed files with 84 additions and 2 deletions
hooks
templates/icehouse

@ -53,6 +53,8 @@ QUANTUM_PLUGIN_CONF = {
NEUTRON_OVS_PLUGIN_CONF = \
"/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini"
NEUTRON_ML2_PLUGIN_CONF = \
"/etc/neutron/plugins/ml2/ml2_conf.ini"
NEUTRON_NVP_PLUGIN_CONF = \
"/etc/neutron/plugins/nicira/nvp.ini"
NEUTRON_PLUGIN_CONF = {
@ -209,7 +211,8 @@ QUANTUM_OVS_CONFIG_FILES.update(QUANTUM_SHARED_CONFIG_FILES)
NEUTRON_OVS_CONFIG_FILES = {
NEUTRON_CONF: {
'hook_contexts': [context.AMQPContext(),
QuantumGatewayContext()],
QuantumGatewayContext(),
QuantumSharedDBContext()],
'services': ['neutron-l3-agent',
'neutron-dhcp-agent',
'neutron-metadata-agent',
@ -226,6 +229,10 @@ NEUTRON_OVS_CONFIG_FILES = {
QuantumGatewayContext()],
'services': ['neutron-plugin-openvswitch-agent']
},
NEUTRON_ML2_PLUGIN_CONF: {
'hook_contexts': [QuantumGatewayContext()],
'services': ['neutron-plugin-openvswitch-agent']
},
EXT_PORT_CONF: {
'hook_contexts': [ExternalPortContext()],
'services': []
@ -269,6 +276,12 @@ def register_configs():
plugin = config('plugin')
name = networking_name()
if plugin == 'ovs':
if release >= 'icehouse':
CONFIG_FILES[name][plugin].pop(NEUTRON_OVS_PLUGIN_CONF)
else:
CONFIG_FILES[name][plugin].pop(NEUTRON_ML2_PLUGIN_CONF)
for conf in CONFIG_FILES[name][plugin]:
configs.register(conf,
CONFIG_FILES[name][plugin][conf]['hook_contexts'])
@ -295,8 +308,16 @@ def restart_map():
that should be restarted when file changes.
'''
_map = {}
release = get_os_codename_install_source(config('openstack-origin'))
plugin = config('plugin')
name = networking_name()
for f, ctxt in CONFIG_FILES[name][config('plugin')].iteritems():
if plugin == 'ovs':
if release >= 'icehouse':
CONFIG_FILES[name][plugin].pop(NEUTRON_OVS_PLUGIN_CONF)
else:
CONFIG_FILES[name][plugin].pop(NEUTRON_ML2_PLUGIN_CONF)
for f, ctxt in CONFIG_FILES[name][plugin].iteritems():
svcs = []
for svc in ctxt['services']:
svcs.append(svc)

@ -0,0 +1,61 @@
[ml2]
# (ListOpt) List of network type driver entrypoints to be loaded from
# the neutron.ml2.type_drivers namespace.
#
# type_drivers = local,flat,vlan,gre,vxlan
# Example: type_drivers = flat,vlan,gre,vxlan
type_drivers = gre
# (ListOpt) Ordered list of network_types to allocate as tenant
# networks. The default value 'local' is useful for single-box testing
# but provides no connectivity between hosts.
#
# tenant_network_types = local
# Example: tenant_network_types = vlan,gre,vxlan
tenant_network_types = gre
# (ListOpt) Ordered list of networking mechanism driver entrypoints
# to be loaded from the neutron.ml2.mechanism_drivers namespace.
# mechanism_drivers =
# Example: mechanism_drivers = arista
# Example: mechanism_drivers = cisco,logger
mechanism_drivers = openvswitch
[ml2_type_flat]
# (ListOpt) List of physical_network names with which flat networks
# can be created. Use * to allow flat networks with arbitrary
# physical_network names.
#
# flat_networks =
# Example:flat_networks = physnet1,physnet2
# Example:flat_networks = *
[ml2_type_vlan]
# (ListOpt) List of <physical_network>[:<vlan_min>:<vlan_max>] tuples
# specifying physical_network names usable for VLAN provider and
# tenant networks, as well as ranges of VLAN tags on each
# physical_network available for allocation as tenant networks.
#
# network_vlan_ranges =
# Example: network_vlan_ranges = physnet1:1000:2999,physnet2
[ml2_type_gre]
# (ListOpt) Comma-separated list of <tun_min>:<tun_max> tuples enumerating ranges of GRE tunnel IDs that are available for tenant network allocation
# tunnel_id_ranges =
tunnel_id_ranges = 1:1000
[ml2_type_vxlan]
# (ListOpt) Comma-separated list of <vni_min>:<vni_max> tuples enumerating
# ranges of VXLAN VNI IDs that are available for tenant network allocation.
#
# vni_ranges =
# (StrOpt) Multicast group for the VXLAN interface. When configured, will
# enable sending all broadcast traffic to this multicast group. When left
# unconfigured, will disable multicast VXLAN mode.
#
# vxlan_group =
# Example: vxlan_group = 239.1.1.1
[ovs]
local_ip = {{ local_ip }}