From 08bfbed4c35e0aab95d44619dd7975d969d8acba Mon Sep 17 00:00:00 2001 From: zhanghao Date: Mon, 6 Jan 2020 11:54:12 -0500 Subject: [PATCH] Remove the condition that the mtu is nullable The mtu is already non-nullable, it no longer needs to judge the mtu when updating the network. Related-Bug: #1842261 Change-Id: Ic097bc2ae50198a3bda45e4a8161c22190ef1964 --- neutron/plugins/ml2/plugin.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/neutron/plugins/ml2/plugin.py b/neutron/plugins/ml2/plugin.py index 0692a70cf49..ffb5d1f7676 100644 --- a/neutron/plugins/ml2/plugin.py +++ b/neutron/plugins/ml2/plugin.py @@ -1091,12 +1091,7 @@ class Ml2Plugin(db_base_plugin_v2.NeutronDbPluginV2, # relationship can be updated. context.session.expire(db_network) - if (mtuw_apidef.MTU in net_data or - # NOTE(ihrachys) mtu may be null for existing networks, - # calculate and update it as needed; the conditional can be - # removed in Queens when we populate all mtu attributes and - # enforce it's not nullable on database level - db_network.mtu is None): + if mtuw_apidef.MTU in net_data: db_network.mtu = self._get_network_mtu(db_network) # agents should now update all ports to reflect new MTU need_network_update_notify = True