[Neutron] Deprecate ovs and linuxbridge plugins

They are no longer available in Juno.
Change-Id: Ic191384ca46594340ce5cf13b08218299e784117
This commit is contained in:
Lukas Bezdicka 2014-11-26 22:34:08 -05:00
parent 067929ad36
commit a27c2bb271
10 changed files with 53 additions and 305 deletions

View File

@ -461,39 +461,21 @@ Neutron Config Parameters
**CONFIG_NEUTRON_L3_EXT_BRIDGE** **CONFIG_NEUTRON_L3_EXT_BRIDGE**
The name of the bridge that the Neutron L3 agent will use for external traffic, or 'provider' if using provider networks. The name of the bridge that the Neutron L3 agent will use for external traffic, or 'provider' if using provider networks.
**CONFIG_NEUTRON_L2_PLUGIN**
The name of the L2 plugin to be used with Neutron. (eg. linuxbridge, openvswitch, ml2).
**CONFIG_NEUTRON_METADATA_PW** **CONFIG_NEUTRON_METADATA_PW**
A comma separated list of IP addresses on which to install Neutron metadata agent. A comma separated list of IP addresses on which to install Neutron metadata agent.
**CONFIG_NEUTRON_FWAAS** **CONFIG_NEUTRON_FWAAS**
Whether to configure neutron Firewall as a Service. Whether to configure neutron Firewall as a Service.
**CONFIG_NEUTRON_LB_TENANT_NETWORK_TYPE**
The type of network to allocate for tenant networks (eg. vlan, local, gre).
**CONFIG_NEUTRON_LB_VLAN_RANGES**
A comma separated list of VLAN ranges for the Neutron linuxbridge plugin (eg. physnet1:1:4094,physnet2,physnet3:3000:3999).
**CONFIG_NEUTRON_LB_INTERFACE_MAPPINGS** **CONFIG_NEUTRON_LB_INTERFACE_MAPPINGS**
A comma separated list of interface mappings for the Neutron linuxbridge plugin (eg. physnet1:br-eth1,physnet2:br-eth2,physnet3:br-eth3). A comma separated list of interface mappings for the Neutron linuxbridge plugin (eg. physnet1:br-eth1,physnet2:br-eth2,physnet3:br-eth3).
**CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE**
Type of network to allocate for tenant networks (eg. vlan, local, gre).
**CONFIG_NEUTRON_OVS_VLAN_RANGES**
A comma separated list of VLAN ranges for the Neutron openvswitch plugin (eg. physnet1:1:4094,physnet2,physnet3:3000:3999).
**CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS** **CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS**
A comma separated list of bridge mappings for the Neutron openvswitch plugin (eg. physnet1:br-eth1,physnet2:br-eth2,physnet3:br-eth3). A comma separated list of bridge mappings for the Neutron openvswitch plugin (eg. physnet1:br-eth1,physnet2:br-eth2,physnet3:br-eth3).
**CONFIG_NEUTRON_OVS_BRIDGE_IFACES** **CONFIG_NEUTRON_OVS_BRIDGE_IFACES**
A comma separated list of colon-separated OVS brid. A comma separated list of colon-separated OVS brid.
**CONFIG_NEUTRON_OVS_TUNNEL_RANGES**
A comma separated list of tunnel ranges for the Neutron openvswitch plugin.
**CONFIG_NEUTRON_OVS_TUNNEL_IF** **CONFIG_NEUTRON_OVS_TUNNEL_IF**
Override the IP used for GRE tunnels on this hypervisor to the IP found on the specified interface (defaults to the HOST IP). Override the IP used for GRE tunnels on this hypervisor to the IP found on the specified interface (defaults to the HOST IP).

View File

@ -78,21 +78,6 @@ def initConfig(controller):
"NEED_CONFIRM": False, "NEED_CONFIRM": False,
"CONDITION": False}, "CONDITION": False},
{"CMD_OPTION": "os-neutron-l2-plugin",
"USAGE": "The name of the L2 plugin to be used with Neutron. "
"(eg. linuxbridge, openvswitch, ml2)",
"PROMPT": ("Enter the name of the L2 plugin to be used "
"with Neutron"),
"OPTION_LIST": ["linuxbridge", "openvswitch", "ml2"],
"VALIDATORS": [validators.validate_options],
"DEFAULT_VALUE": "ml2",
"MASK_INPUT": False,
"LOOSE_VALIDATION": False,
"CONF_NAME": "CONFIG_NEUTRON_L2_PLUGIN",
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False},
{"CMD_OPTION": "os-neutron-metadata-pw", {"CMD_OPTION": "os-neutron-metadata-pw",
"USAGE": "Neutron metadata agent password", "USAGE": "Neutron metadata agent password",
"PROMPT": "Enter Neutron metadata agent password", "PROMPT": "Enter Neutron metadata agent password",
@ -149,40 +134,7 @@ def initConfig(controller):
"CONDITION": False}, "CONDITION": False},
], ],
"NEUTRON_LB_PLUGIN": [ "NEUTRON_LB_AGENT": [
{"CMD_OPTION": "os-neutron-lb-tenant-network-type",
"USAGE": ("The type of network to allocate for tenant networks "
"(eg. vlan, local)"),
"PROMPT": ("Enter the type of network to allocate for tenant "
"networks"),
"OPTION_LIST": ["local", "vlan"],
"VALIDATORS": [validators.validate_options],
"DEFAULT_VALUE": "local",
"MASK_INPUT": False,
"LOOSE_VALIDATION": False,
"CONF_NAME": "CONFIG_NEUTRON_LB_TENANT_NETWORK_TYPE",
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False},
{"CMD_OPTION": "os-neutron-lb-vlan-ranges",
"USAGE": ("A comma separated list of VLAN ranges for the Neutron "
"linuxbridge plugin (eg. physnet1:1:4094,physnet2,"
"physnet3:3000:3999)"),
"PROMPT": ("Enter a comma separated list of VLAN ranges for "
"the Neutron linuxbridge plugin"),
"OPTION_LIST": [],
"VALIDATORS": [],
"DEFAULT_VALUE": "",
"MASK_INPUT": False,
"LOOSE_VALIDATION": True,
"CONF_NAME": "CONFIG_NEUTRON_LB_VLAN_RANGES",
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False},
],
"NEUTRON_LB_PLUGIN_AND_AGENT": [
{"CMD_OPTION": "os-neutron-lb-interface-mappings", {"CMD_OPTION": "os-neutron-lb-interface-mappings",
"USAGE": ("A comma separated list of interface mappings for the " "USAGE": ("A comma separated list of interface mappings for the "
"Neutron linuxbridge plugin (eg. physnet1:br-eth1," "Neutron linuxbridge plugin (eg. physnet1:br-eth1,"
@ -200,40 +152,7 @@ def initConfig(controller):
"CONDITION": False}, "CONDITION": False},
], ],
"NEUTRON_OVS_PLUGIN": [ "NEUTRON_OVS_AGENT": [
{"CMD_OPTION": "os-neutron-ovs-tenant-network-type",
"USAGE": ("Type of network to allocate for tenant networks "
"(eg. vlan, local, gre, vxlan)"),
"PROMPT": ("Enter the type of network to allocate for tenant "
"networks"),
"OPTION_LIST": ["local", "vlan", "gre", "vxlan"],
"VALIDATORS": [validators.validate_options],
"DEFAULT_VALUE": "vxlan",
"MASK_INPUT": False,
"LOOSE_VALIDATION": False,
"CONF_NAME": "CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE",
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False},
{"CMD_OPTION": "os-neutron-ovs-vlan-ranges",
"USAGE": ("A comma separated list of VLAN ranges for the Neutron "
"openvswitch plugin (eg. physnet1:1:4094,physnet2,"
"physnet3:3000:3999)"),
"PROMPT": ("Enter a comma separated list of VLAN ranges for the "
"Neutron openvswitch plugin"),
"OPTION_LIST": [],
"VALIDATORS": [],
"DEFAULT_VALUE": "",
"MASK_INPUT": False,
"LOOSE_VALIDATION": True,
"CONF_NAME": "CONFIG_NEUTRON_OVS_VLAN_RANGES",
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False},
],
"NEUTRON_OVS_PLUGIN_AND_AGENT": [
{"CMD_OPTION": "os-neutron-ovs-bridge-mappings", {"CMD_OPTION": "os-neutron-ovs-bridge-mappings",
"USAGE": ("A comma separated list of bridge mappings for the " "USAGE": ("A comma separated list of bridge mappings for the "
"Neutron openvswitch plugin (eg. physnet1:br-eth1," "Neutron openvswitch plugin (eg. physnet1:br-eth1,"
@ -267,24 +186,7 @@ def initConfig(controller):
"CONDITION": False}, "CONDITION": False},
], ],
"NEUTRON_OVS_PLUGIN_TUNNEL": [ "NEUTRON_OVS_AGENT_TUNNEL": [
{"CMD_OPTION": "os-neutron-ovs-tunnel-ranges",
"USAGE": ("A comma separated list of tunnel ranges for the "
"Neutron openvswitch plugin (eg. 1:1000)"),
"PROMPT": ("Enter a comma separated list of tunnel ranges for "
"the Neutron openvswitch plugin"),
"OPTION_LIST": [],
"VALIDATORS": [],
"DEFAULT_VALUE": "",
"MASK_INPUT": False,
"LOOSE_VALIDATION": True,
"CONF_NAME": "CONFIG_NEUTRON_OVS_TUNNEL_RANGES",
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False},
],
"NEUTRON_OVS_PLUGIN_AND_AGENT_TUNNEL": [
{"CMD_OPTION": "os-neutron-ovs-tunnel-if", {"CMD_OPTION": "os-neutron-ovs-tunnel-if",
"USAGE": ("The interface for the OVS tunnel. Packstack will " "USAGE": ("The interface for the OVS tunnel. Packstack will "
"override the IP address used for tunnels on this " "override the IP address used for tunnels on this "
@ -303,7 +205,7 @@ def initConfig(controller):
"CONDITION": False}, "CONDITION": False},
], ],
"NEUTRON_OVS_PLUGIN_AND_AGENT_VXLAN": [ "NEUTRON_OVS_AGENT_VXLAN": [
{"CMD_OPTION": "os-neutron-ovs-vxlan-udp-port", {"CMD_OPTION": "os-neutron-ovs-vxlan-udp-port",
"CONF_NAME": "CONFIG_NEUTRON_OVS_VXLAN_UDP_PORT", "CONF_NAME": "CONFIG_NEUTRON_OVS_VXLAN_UDP_PORT",
"USAGE": "VXLAN UDP port", "USAGE": "VXLAN UDP port",
@ -313,7 +215,6 @@ def initConfig(controller):
"DEFAULT_VALUE": 4789, "DEFAULT_VALUE": 4789,
"MASK_INPUT": False, "MASK_INPUT": False,
"LOOSE_VALIDATION": True, "LOOSE_VALIDATION": True,
"USE_DEFAULT": False, "USE_DEFAULT": False,
"NEED_CONFIRM": False, "NEED_CONFIRM": False,
"CONDITION": False}, "CONDITION": False},
@ -487,54 +388,33 @@ def initConfig(controller):
{"GROUP_NAME": "NEUTRON_ML2_PLUGIN", {"GROUP_NAME": "NEUTRON_ML2_PLUGIN",
"DESCRIPTION": "Neutron ML2 plugin config", "DESCRIPTION": "Neutron ML2 plugin config",
"PRE_CONDITION": use_ml2_plugin, "PRE_CONDITION": neutron_install,
"PRE_CONDITION_MATCH": True, "PRE_CONDITION_MATCH": True,
"POST_CONDITION": False, "POST_CONDITION": False,
"POST_CONDITION_MATCH": True}, "POST_CONDITION_MATCH": True},
{"GROUP_NAME": "NEUTRON_LB_PLUGIN", {"GROUP_NAME": "NEUTRON_LB_AGENT",
"DESCRIPTION": "Neutron LB plugin config",
"PRE_CONDITION": use_linuxbridge_plugin,
"PRE_CONDITION_MATCH": True,
"POST_CONDITION": False,
"POST_CONDITION_MATCH": True},
{"GROUP_NAME": "NEUTRON_LB_PLUGIN_AND_AGENT",
"DESCRIPTION": "Neutron LB agent config", "DESCRIPTION": "Neutron LB agent config",
"PRE_CONDITION": use_linuxbridge_agent, "PRE_CONDITION": use_ml2_with_linuxbridge,
"PRE_CONDITION_MATCH": True, "PRE_CONDITION_MATCH": True,
"POST_CONDITION": False, "POST_CONDITION": False,
"POST_CONDITION_MATCH": True}, "POST_CONDITION_MATCH": True},
{"GROUP_NAME": "NEUTRON_OVS_PLUGIN", {"GROUP_NAME": "NEUTRON_OVS_AGENT",
"DESCRIPTION": "Neutron OVS plugin config",
"PRE_CONDITION": use_openvswitch_plugin,
"PRE_CONDITION_MATCH": True,
"POST_CONDITION": False,
"POST_CONDITION_MATCH": True},
{"GROUP_NAME": "NEUTRON_OVS_PLUGIN_AND_AGENT",
"DESCRIPTION": "Neutron OVS agent config", "DESCRIPTION": "Neutron OVS agent config",
"PRE_CONDITION": use_openvswitch_agent, "PRE_CONDITION": use_ml2_with_ovs,
"PRE_CONDITION_MATCH": True, "PRE_CONDITION_MATCH": True,
"POST_CONDITION": False, "POST_CONDITION": False,
"POST_CONDITION_MATCH": True}, "POST_CONDITION_MATCH": True},
{"GROUP_NAME": "NEUTRON_OVS_PLUGIN_TUNNEL", {"GROUP_NAME": "NEUTRON_OVS_AGENT_TUNNEL",
"DESCRIPTION": "Neutron OVS plugin config for tunnels",
"PRE_CONDITION": use_openvswitch_plugin_tunnel,
"PRE_CONDITION_MATCH": True,
"POST_CONDITION": False,
"POST_CONDITION_MATCH": True},
{"GROUP_NAME": "NEUTRON_OVS_PLUGIN_AND_AGENT_TUNNEL",
"DESCRIPTION": "Neutron OVS agent config for tunnels", "DESCRIPTION": "Neutron OVS agent config for tunnels",
"PRE_CONDITION": use_openvswitch_agent_tunnel, "PRE_CONDITION": use_ml2_with_ovs,
"PRE_CONDITION_MATCH": True, "PRE_CONDITION_MATCH": True,
"POST_CONDITION": False, "POST_CONDITION": False,
"POST_CONDITION_MATCH": True}, "POST_CONDITION_MATCH": True},
{"GROUP_NAME": "NEUTRON_OVS_PLUGIN_AND_AGENT_VXLAN", {"GROUP_NAME": "NEUTRON_OVS_AGENT_VXLAN",
"DESCRIPTION": "Neutron OVS agent config for VXLAN", "DESCRIPTION": "Neutron OVS agent config for VXLAN",
"PRE_CONDITION": use_openvswitch_vxlan, "PRE_CONDITION": use_openvswitch_vxlan,
"PRE_CONDITION_MATCH": True, "PRE_CONDITION_MATCH": True,
@ -551,31 +431,22 @@ def initSequences(controller):
if config['CONFIG_NEUTRON_INSTALL'] != 'y': if config['CONFIG_NEUTRON_INSTALL'] != 'y':
return return
if config['CONFIG_NEUTRON_L2_PLUGIN'] == 'openvswitch': plugin_db = 'neutron'
plugin_db = 'ovs_neutron' plugin_path = 'neutron.plugins.ml2.plugin.Ml2Plugin'
plugin_path = ('neutron.plugins.openvswitch.ovs_neutron_plugin.' # values modification
'OVSNeutronPluginV2') for key in ('CONFIG_NEUTRON_ML2_TYPE_DRIVERS',
elif config['CONFIG_NEUTRON_L2_PLUGIN'] == 'linuxbridge': 'CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES',
plugin_db = 'neutron_linux_bridge' 'CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS',
plugin_path = ('neutron.plugins.linuxbridge.lb_neutron_plugin.' 'CONFIG_NEUTRON_ML2_FLAT_NETWORKS',
'LinuxBridgePluginV2') 'CONFIG_NEUTRON_ML2_VLAN_RANGES',
elif config['CONFIG_NEUTRON_L2_PLUGIN'] == 'ml2': 'CONFIG_NEUTRON_ML2_TUNNEL_ID_RANGES',
plugin_db = 'neutron' 'CONFIG_NEUTRON_ML2_VNI_RANGES'):
plugin_path = 'neutron.plugins.ml2.plugin.Ml2Plugin' if config[key] == '':
# values modification config[key] = []
for key in ('CONFIG_NEUTRON_ML2_TYPE_DRIVERS', else:
'CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES', config[key] = [i.strip() for i in config[key].split(',') if i]
'CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS', key = 'CONFIG_NEUTRON_ML2_VXLAN_GROUP'
'CONFIG_NEUTRON_ML2_FLAT_NETWORKS', config[key] = "%s" % config[key] if config[key] else ''
'CONFIG_NEUTRON_ML2_VLAN_RANGES',
'CONFIG_NEUTRON_ML2_TUNNEL_ID_RANGES',
'CONFIG_NEUTRON_ML2_VNI_RANGES'):
if config[key] == '':
config[key] = []
else:
config[key] = [i.strip() for i in config[key].split(',') if i]
key = 'CONFIG_NEUTRON_ML2_VXLAN_GROUP'
config[key] = "%s" % config[key] if config[key] else ''
config['CONFIG_NEUTRON_L2_DBNAME'] = plugin_db config['CONFIG_NEUTRON_L2_DBNAME'] = plugin_db
config['CONFIG_NEUTRON_CORE_PLUGIN'] = plugin_path config['CONFIG_NEUTRON_CORE_PLUGIN'] = plugin_path
@ -614,75 +485,35 @@ def initSequences(controller):
#------------------------- helper functions ------------------------- #------------------------- helper functions -------------------------
def use_ml2_plugin(config): def neutron_install(config):
return (config['CONFIG_NEUTRON_INSTALL'] == 'y' and return config['CONFIG_NEUTRON_INSTALL'] == 'y'
config['CONFIG_NEUTRON_L2_PLUGIN'] == 'ml2')
def use_linuxbridge_plugin(config): def use_ml2_with_linuxbridge(config):
result = (config['CONFIG_NEUTRON_INSTALL'] == 'y' and ml2_used = (neutron_install(config) and
config['CONFIG_NEUTRON_L2_PLUGIN'] == 'linuxbridge')
if result:
config["CONFIG_NEUTRON_L2_AGENT"] = 'linuxbridge'
return result
def use_linuxbridge_agent(config):
ml2_used = (use_ml2_plugin(config) and
config["CONFIG_NEUTRON_L2_AGENT"] == 'linuxbridge') config["CONFIG_NEUTRON_L2_AGENT"] == 'linuxbridge')
return use_linuxbridge_plugin(config) or ml2_used return ml2_used
def use_openvswitch_plugin(config):
result = (config['CONFIG_NEUTRON_INSTALL'] == 'y' and
config['CONFIG_NEUTRON_L2_PLUGIN'] == 'openvswitch')
if result:
config["CONFIG_NEUTRON_L2_AGENT"] = 'openvswitch'
return result
def use_openvswitch_plugin_tunnel(config):
tun_types = ('gre', 'vxlan')
return (use_openvswitch_plugin(config) and
config['CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE'] in tun_types)
def use_ml2_with_ovs(config): def use_ml2_with_ovs(config):
return (use_ml2_plugin(config) and return (neutron_install(config) and
config["CONFIG_NEUTRON_L2_AGENT"] == 'openvswitch') config["CONFIG_NEUTRON_L2_AGENT"] == 'openvswitch')
def use_openvswitch_agent(config):
return use_openvswitch_plugin(config) or use_ml2_with_ovs(config)
def use_openvswitch_agent_tunnel(config):
return (use_openvswitch_plugin_tunnel(config) or
use_ml2_with_ovs(config))
def use_openvswitch_vxlan(config): def use_openvswitch_vxlan(config):
ovs_vxlan = (
use_openvswitch_plugin_tunnel(config) and
config['CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE'] == 'vxlan'
)
ml2_vxlan = ( ml2_vxlan = (
use_ml2_with_ovs(config) and use_ml2_with_ovs(config) and
'vxlan' in config['CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES'] 'vxlan' in config['CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES']
) )
return ovs_vxlan or ml2_vxlan return ml2_vxlan
def use_openvswitch_gre(config): def use_openvswitch_gre(config):
ovs_vxlan = (
use_openvswitch_plugin_tunnel(config) and
config['CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE'] == 'gre'
)
ml2_vxlan = ( ml2_vxlan = (
use_ml2_with_ovs(config) and use_ml2_with_ovs(config) and
'gre' in config['CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES'] 'gre' in config['CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES']
) )
return ovs_vxlan or ml2_vxlan return ml2_vxlan
def get_if_driver(config): def get_if_driver(config):
@ -711,11 +542,11 @@ def create_manifests(config, messages):
service_plugins.append( service_plugins.append(
'neutron.services.loadbalancer.plugin.LoadBalancerPlugin' 'neutron.services.loadbalancer.plugin.LoadBalancerPlugin'
) )
if config['CONFIG_NEUTRON_L2_PLUGIN'] == 'ml2':
# ML2 uses the L3 Router service plugin to implement l3 agent # ML2 uses the L3 Router service plugin to implement l3 agent
service_plugins.append( service_plugins.append(
'neutron.services.l3_router.l3_router_plugin.L3RouterPlugin' 'neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'
) )
if config['CONFIG_NEUTRON_METERING_AGENT_INSTALL'] == 'y': if config['CONFIG_NEUTRON_METERING_AGENT_INSTALL'] == 'y':
service_plugins.append( service_plugins.append(
@ -730,13 +561,7 @@ def create_manifests(config, messages):
config['SERVICE_PLUGINS'] = (service_plugins if service_plugins config['SERVICE_PLUGINS'] = (service_plugins if service_plugins
else 'undef') else 'undef')
if config['CONFIG_NEUTRON_L2_PLUGIN'] == 'openvswitch': plugin_manifest = 'neutron_ml2_plugin.pp'
nettype = config.get("CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE", "local")
plugin_manifest = 'neutron_ovs_plugin_%s.pp' % nettype
elif config['CONFIG_NEUTRON_L2_PLUGIN'] == 'linuxbridge':
plugin_manifest = 'neutron_lb_plugin.pp'
elif config['CONFIG_NEUTRON_L2_PLUGIN'] == 'ml2':
plugin_manifest = 'neutron_ml2_plugin.pp'
for host in q_hosts: for host in q_hosts:
manifest_file = "%s_neutron.pp" % (host,) manifest_file = "%s_neutron.pp" % (host,)
@ -805,7 +630,6 @@ def create_keystone_manifest(config, messages):
def create_l3_manifests(config, messages): def create_l3_manifests(config, messages):
global network_hosts global network_hosts
plugin = config['CONFIG_NEUTRON_L2_PLUGIN']
if config['CONFIG_NEUTRON_L3_EXT_BRIDGE'] == 'provider': if config['CONFIG_NEUTRON_L3_EXT_BRIDGE'] == 'provider':
config['CONFIG_NEUTRON_L3_EXT_BRIDGE'] = '' config['CONFIG_NEUTRON_L3_EXT_BRIDGE'] = ''
@ -833,7 +657,6 @@ def create_l3_manifests(config, messages):
def create_dhcp_manifests(config, messages): def create_dhcp_manifests(config, messages):
global network_hosts global network_hosts
plugin = config['CONFIG_NEUTRON_L2_PLUGIN']
for host in network_hosts: for host in network_hosts:
config["CONFIG_NEUTRON_DHCP_HOST"] = host config["CONFIG_NEUTRON_DHCP_HOST"] = host
config['CONFIG_NEUTRON_DHCP_INTERFACE_DRIVER'] = get_if_driver(config) config['CONFIG_NEUTRON_DHCP_INTERFACE_DRIVER'] = get_if_driver(config)
@ -902,7 +725,6 @@ def create_metering_agent_manifests(config, messages):
def create_l2_agent_manifests(config, messages): def create_l2_agent_manifests(config, messages):
global network_hosts, compute_hosts global network_hosts, compute_hosts
plugin = config['CONFIG_NEUTRON_L2_PLUGIN']
agent = config["CONFIG_NEUTRON_L2_AGENT"] agent = config["CONFIG_NEUTRON_L2_AGENT"]
# CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS will be available only for ML2 # CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS will be available only for ML2
@ -915,15 +737,8 @@ def create_l2_agent_manifests(config, messages):
config['CONFIG_NEUTRON_USE_L2POPULATION'] = False config['CONFIG_NEUTRON_USE_L2POPULATION'] = False
if agent == "openvswitch": if agent == "openvswitch":
if plugin == agent: ovs_type = 'CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES'
# monolithic plugin installation ovs_type = config.get(ovs_type, 'local')
ovs_type = 'CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE'
ovs_type = config.get(ovs_type, 'local')
elif plugin == 'ml2':
ovs_type = 'CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES'
ovs_type = config.get(ovs_type, 'local')
else:
raise RuntimeError('Invalid combination of plugin and agent.')
tunnel = use_openvswitch_vxlan(config) or use_openvswitch_gre(config) tunnel = use_openvswitch_vxlan(config) or use_openvswitch_gre(config)
config["CONFIG_NEUTRON_OVS_TUNNELING"] = tunnel config["CONFIG_NEUTRON_OVS_TUNNELING"] = tunnel
tunnel_types = set(ovs_type) & set(['gre', 'vxlan']) tunnel_types = set(ovs_type) & set(['gre', 'vxlan'])

View File

@ -180,8 +180,7 @@ def initConfig(controller):
return (config.get('CONFIG_PROVISION_TEMPEST', 'n') == 'y') return (config.get('CONFIG_PROVISION_TEMPEST', 'n') == 'y')
def allow_all_in_one_ovs_bridge(config): def allow_all_in_one_ovs_bridge(config):
return (config['CONFIG_NEUTRON_INSTALL'] == 'y' and return (config['CONFIG_NEUTRON_INSTALL'] == 'y')
config['CONFIG_NEUTRON_L2_PLUGIN'] == 'openvswitch')
conf_groups = [ conf_groups = [
{"GROUP_NAME": "PROVISION_INIT", {"GROUP_NAME": "PROVISION_INIT",

View File

@ -1,4 +0,0 @@
class { 'neutron::plugins::linuxbridge':
tenant_network_type => hiera('CONFIG_NEUTRON_LB_TENANT_NETWORK_TYPE'),
network_vlan_ranges => hiera('CONFIG_NEUTRON_LB_VLAN_RANGES'),
}

View File

@ -7,29 +7,11 @@ if $ovs_agent_vxlan_cfg_neut_ovs_tun_if != '' {
$localip = $cfg_neutron_ovs_host $localip = $cfg_neutron_ovs_host
} }
if hiera('CONFIG_NEUTRON_L2_PLUGIN') == 'ml2' { class { 'neutron::agents::ml2::ovs':
class { 'neutron::agents::ml2::ovs': bridge_mappings => hiera_array('CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS'),
bridge_mappings => hiera_array('CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS'), enable_tunneling => hiera('CONFIG_NEUTRON_OVS_TUNNELING'),
enable_tunneling => hiera('CONFIG_NEUTRON_OVS_TUNNELING'), tunnel_types => hiera_array('CONFIG_NEUTRON_OVS_TUNNEL_TYPES'),
tunnel_types => hiera_array('CONFIG_NEUTRON_OVS_TUNNEL_TYPES'), local_ip => $localip,
local_ip => $localip, vxlan_udp_port => hiera('CONFIG_NEUTRON_OVS_VXLAN_UDP_PORT',undef),
vxlan_udp_port => hiera('CONFIG_NEUTRON_OVS_VXLAN_UDP_PORT',undef), l2_population => hiera('CONFIG_NEUTRON_USE_L2POPULATION'),
l2_population => hiera('CONFIG_NEUTRON_USE_L2POPULATION'),
}
} else {
class { 'neutron::agents::ovs':
bridge_mappings => hiera_array('CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS'),
enable_tunneling => hiera('CONFIG_NEUTRON_OVS_TUNNELING'),
tunnel_types => hiera_array('CONFIG_NEUTRON_OVS_TUNNEL_TYPES'),
local_ip => $localip,
vxlan_udp_port => hiera('CONFIG_NEUTRON_OVS_VXLAN_UDP_PORT',undef),
}
file { 'ovs_neutron_plugin.ini':
path => '/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini',
owner => 'root',
group => 'neutron',
before => Service['ovs-cleanup-service'],
require => Package['neutron-plugin-ovs'],
}
} }

View File

@ -1,10 +1,4 @@
$ovs_bridge_cfg_neut_l2_plugin = hiera('CONFIG_NEUTRON_L2_PLUGIN') $agent_service = 'neutron-ovs-agent-service'
if $ovs_bridge_cfg_neut_l2_plugin == 'ml2' {
$agent_service = 'neutron-ovs-agent-service'
} else {
$agent_service = 'neutron-plugin-ovs-service'
}
$config_neutron_ovs_bridge = hiera('CONFIG_NEUTRON_OVS_BRIDGE') $config_neutron_ovs_bridge = hiera('CONFIG_NEUTRON_OVS_BRIDGE')

View File

@ -1,5 +0,0 @@
class { 'neutron::plugins::ovs':
tenant_network_type => hiera('CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE'),
network_vlan_ranges => hiera('CONFIG_NEUTRON_OVS_VLAN_RANGES'),
tunnel_id_ranges => hiera('CONFIG_NEUTRON_OVS_TUNNEL_RANGES'),
}

View File

@ -1,4 +0,0 @@
class { 'neutron::plugins::ovs':
tenant_network_type => hiera('CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE'),
network_vlan_ranges => hiera('CONFIG_NEUTRON_OVS_VLAN_RANGES'),
}

View File

@ -1,4 +0,0 @@
class { 'neutron::plugins::ovs':
tenant_network_type => hiera('CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE'),
network_vlan_ranges => hiera('CONFIG_NEUTRON_OVS_VLAN_RANGES'),
}

View File

@ -1,7 +0,0 @@
class { 'neutron::plugins::ovs':
tenant_network_type => hiera('CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE'),
network_vlan_ranges => hiera('CONFIG_NEUTRON_OVS_VLAN_RANGES'),
tunnel_id_ranges => hiera('CONFIG_NEUTRON_OVS_TUNNEL_RANGES'),
vxlan_udp_port => hiera('CONFIG_NEUTRON_OVS_VXLAN_UDP_PORT'),
}