Skip to content

Commit ce8488d

Browse files
committed
feat(neutron): make our VXLAN type extend upstream
Instead of a no-op VXLAN type driver that doesn't support anything or do anything, switch to just being an extension of the upstream VXLAN type driver. In the future this may morph into its own distinct type so that we can support physical network fields on this type but currently that is not supported by Neutron. The concept of VXLAN in Neutron is centered around the hypervisor/instance use case which does not have multiple VRFs per hypervisor so there is no ability to separate out the VXLAN networks. But in the physical VXLAN fabrics where different servers can be bound to different fabrics we do have that separation.
1 parent e594bb4 commit ce8488d

File tree

2 files changed

+4
-40
lines changed

2 files changed

+4
-40
lines changed

components/neutron/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ conf:
5252
# we'll need to use the ovn ML2 plugin to hook the routers to our network
5353
mechanism_drivers: "understack,ovn"
5454
tenant_network_types: "vlan"
55-
type_drivers: "vlan,understack_vxlan"
55+
type_drivers: "vlan,vxlan"
5656
ml2_type_vxlan:
5757
# OSH sets a default range here but we want to use network_segment_range plugin
5858
# to configure this instead
Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,9 @@
1+
from neutron.plugins.ml2.drivers import type_vxlan
12
from neutron_lib import constants as p_const
2-
from neutron_lib.plugins.ml2 import api
3-
from oslo_log import log
43

5-
LOG = log.getLogger(__name__)
64

7-
8-
class UnderstackVxlanTypeDriver(api.ML2TypeDriver):
9-
def __init__(self):
10-
"""Understack based type driver."""
11-
super().__init__()
12-
LOG.info("ML2 Understack VXLAN Type initialization complete")
5+
class UnderstackVxlanTypeDriver(type_vxlan.VxlanTypeDriver):
6+
"""Manage state for EVPN L2VNI networks with ML2."""
137

148
def get_type(self):
159
return p_const.TYPE_VXLAN
16-
17-
def initialize(self):
18-
pass
19-
20-
def initialize_network_segment_range_support(self):
21-
pass
22-
23-
def update_network_segment_range_allocations(self):
24-
pass
25-
26-
def get_network_segment_ranges(self):
27-
pass
28-
29-
def is_partial_segment(self, segment):
30-
return False
31-
32-
def validate_provider_segment(self, segment):
33-
pass
34-
35-
def reserve_provider_segment(self, context, segment, filters=None):
36-
return segment
37-
38-
def allocate_tenant_segment(self, context, filters=None):
39-
return {api.NETWORK_TYPE: p_const.TYPE_VXLAN}
40-
41-
def release_segment(self, context, segment):
42-
pass
43-
44-
def get_mtu(self, physical_network=None):
45-
pass

0 commit comments

Comments
 (0)