Merge "Public n/w access for vxlan tenant n/w in ml2.ovs"

This commit is contained in:
Zuul 2018-05-31 16:37:58 +00:00 committed by Gerrit Code Review
commit c0708b586b
3 changed files with 48 additions and 1 deletions

View File

@ -165,6 +165,16 @@ Set the following user variables in your
network_vlan_ranges: "physnet1:102:199"
network_mappings: "physnet1:br-provider"
# When using Open vSwitch, Tenant network is of type vxlan and want
# to provide the external network connectivity over flat provider
# network, then configure neutron_provider_networks like following.
neutron_provider_networks:
network_flat_networks: "*"
network_types: "vxlan"
network_vxlan_ranges: "1:1000"
network_mappings: "provider:br-provider"
network_interface: eth12
Customization is needed to support additional network types such as vxlan,
GRE or Geneve. Refer to the `neutron agent configuration
<https://docs.openstack.org/neutron/latest/configuration/#configuration-reference>`_ for

View File

@ -0,0 +1,34 @@
---
# Copyright 2018, Ericsson AB and Others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Setup External Network Provider Bridge
openvswitch_bridge:
bridge: "{{ neutron_provider_networks.network_mappings.split(':')[1] }}"
state: present
when:
- neutron_services['neutron-l3-agent']['group'] in group_names
- neutron_plugin_type == 'ml2.ovs'
- neutron_provider_networks.network_mappings is defined
- name: Add port to External Network Provider Bridge
openvswitch_port:
bridge: "{{ neutron_provider_networks.network_mappings.split(':')[1] }}"
port: "{{ neutron_provider_networks.network_interface }}"
state: present
when:
- neutron_services['neutron-l3-agent']['group'] in group_names
- neutron_plugin_type == 'ml2.ovs'
- neutron_provider_networks.network_mappings is defined
- neutron_provider_networks.network_interface is defined

View File

@ -4,7 +4,10 @@
{% if neutron_tunnel_types | length > 0 %}
local_ip = {{ neutron_local_ip }}
{% endif %}
{% if neutron_provider_networks.network_mappings is defined and ((neutron_provider_networks.network_mappings | length) > 0) %}
{% if neutron_plugin_type != 'ml2.ovs' and neutron_provider_networks.network_mappings is defined and ((neutron_provider_networks.network_mappings | length) > 0) %}
bridge_mappings = {{ neutron_provider_networks.network_mappings }}
{% endif %}
{% if neutron_services['neutron-l3-agent']['group'] in group_names and neutron_plugin_type == 'ml2.ovs' and neutron_provider_networks.network_mappings is defined and ((neutron_provider_networks.network_mappings | length) > 0) %}
bridge_mappings = {{ neutron_provider_networks.network_mappings }}
{% endif %}