Merge "Remove core OVN backward compatible code"

This commit is contained in:
Zuul 2024-01-12 15:15:47 +00:00 committed by Gerrit Code Review
commit 9852a8069f
3 changed files with 23 additions and 60 deletions

View File

@ -38,7 +38,8 @@ LOG = logging.getLogger(__name__)
# LOG.setLevel(logging.DEBUG) # LOG.setLevel(logging.DEBUG)
# logging.basicConfig(level=logging.DEBUG) # logging.basicConfig(level=logging.DEBUG)
OVN_TABLES = ["Port_Binding", "Chassis", "Datapath_Binding", "Load_Balancer"] OVN_TABLES = ["Port_Binding", "Chassis", "Datapath_Binding", "Load_Balancer",
"Chassis_Private", "Logical_DP_Group"]
class OVNBGPDriver(driver_api.AgentDriverBase): class OVNBGPDriver(driver_api.AgentDriverBase):
@ -98,25 +99,7 @@ class OVNBGPDriver(driver_api.AgentDriverBase):
events += (event_class(self),) events += (event_class(self),)
self._post_fork_event.clear() self._post_fork_event.clear()
# TODO(lucasagomes): The OVN package in the ubuntu LTS is old
# and does not support Chassis_Private. Once the package is updated
# we can remove this fallback mode.
try:
try:
self.sb_idl = ovn.OvnSbIdl(
self.ovn_remote,
chassis=self.chassis,
tables=OVN_TABLES + ["Chassis_Private",
"Logical_DP_Group"],
events=events).start()
except AssertionError:
self.sb_idl = ovn.OvnSbIdl(
self.ovn_remote,
chassis=self.chassis,
tables=OVN_TABLES + ["Chassis_Private"],
events=events).start()
except AssertionError:
events.remove("ChassisPrivateCreateEvent")
self.sb_idl = ovn.OvnSbIdl( self.sb_idl = ovn.OvnSbIdl(
self.ovn_remote, self.ovn_remote,
chassis=self.chassis, chassis=self.chassis,

View File

@ -36,7 +36,7 @@ LOG = logging.getLogger(__name__)
# LOG.setLevel(logging.DEBUG) # LOG.setLevel(logging.DEBUG)
# logging.basicConfig(level=logging.DEBUG) # logging.basicConfig(level=logging.DEBUG)
OVN_TABLES = ["Port_Binding", "Chassis", "Datapath_Binding"] OVN_TABLES = ["Port_Binding", "Chassis", "Datapath_Binding", "Chassis_Private"]
EVPN_INFO = collections.namedtuple( EVPN_INFO = collections.namedtuple(
'EVPNInfo', ['vrf_name', 'lo_name', 'bridge_name', 'vxlan_name', 'EVPNInfo', ['vrf_name', 'lo_name', 'bridge_name', 'vxlan_name',
'veth_vrf', 'veth_ovs', 'vlan_name']) 'veth_vrf', 'veth_ovs', 'vlan_name'])
@ -78,17 +78,7 @@ class OVNEVPNDriver(driver_api.AgentDriverBase):
events += (event_class(self),) events += (event_class(self),)
self._post_fork_event.clear() self._post_fork_event.clear()
# TODO(lucasagomes): The OVN package in the ubuntu LTS is old
# and does not support Chassis_Private. Once the package is updated
# we can remove this fallback mode.
try:
self.sb_idl = ovn.OvnSbIdl(
self.ovn_remote,
chassis=self.chassis,
tables=OVN_TABLES + ["Chassis_Private"],
events=events).start()
except AssertionError:
events.remove("ChassisPrivateCreateEvent")
self.sb_idl = ovn.OvnSbIdl( self.sb_idl = ovn.OvnSbIdl(
self.ovn_remote, self.ovn_remote,
chassis=self.chassis, chassis=self.chassis,

View File

@ -36,7 +36,7 @@ from ovn_bgp_agent.utils import linux_net
CONF = cfg.CONF CONF = cfg.CONF
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
OVN_TABLES = ["Port_Binding", "Chassis", "Datapath_Binding"] OVN_TABLES = ["Port_Binding", "Chassis", "Datapath_Binding", "Chassis_Private"]
@dataclasses.dataclass(frozen=True, eq=True) @dataclasses.dataclass(frozen=True, eq=True)
@ -93,17 +93,7 @@ class OVNBGPStretchedL2Driver(driver_api.AgentDriverBase):
events += (event_class(self),) events += (event_class(self),)
self._post_fork_event.clear() self._post_fork_event.clear()
# TODO(lucasagomes): The OVN package in the ubuntu LTS is old
# and does not support Chassis_Private. Once the package is updated
# we can remove this fallback mode.
try:
self.sb_idl = ovn.OvnSbIdl(
self.ovn_remote,
chassis=self.chassis,
tables=OVN_TABLES + ["Chassis_Private"],
events=events,
).start()
except AssertionError:
self.sb_idl = ovn.OvnSbIdl( self.sb_idl = ovn.OvnSbIdl(
self.ovn_remote, self.ovn_remote,
chassis=self.chassis, chassis=self.chassis,