]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Add MTU selection to ML2
authorRobert Pothier <rpothier@cisco.com>
Fri, 13 Mar 2015 15:39:27 +0000 (11:39 -0400)
committerRobert Pothier <rpothier@cisco.com>
Tue, 17 Mar 2015 18:02:39 +0000 (14:02 -0400)
ML2 will check the config parameters for the MTU settings.
It will check the segment, path and physnet mtu settings.

Change-Id: I58b57e01ec9bcafd7cdcfbf03149e98c3a1291ed
Partially-Implements: blueprint mtu-selection-and-advertisement

15 files changed:
neutron/plugins/common/constants.py
neutron/plugins/ml2/driver_api.py
neutron/plugins/ml2/drivers/helpers.py
neutron/plugins/ml2/drivers/type_flat.py
neutron/plugins/ml2/drivers/type_gre.py
neutron/plugins/ml2/drivers/type_local.py
neutron/plugins/ml2/drivers/type_tunnel.py
neutron/plugins/ml2/drivers/type_vlan.py
neutron/plugins/ml2/drivers/type_vxlan.py
neutron/plugins/ml2/managers.py
neutron/plugins/ml2/plugin.py
neutron/tests/unit/ml2/test_type_flat.py
neutron/tests/unit/ml2/test_type_gre.py
neutron/tests/unit/ml2/test_type_vlan.py
neutron/tests/unit/ml2/test_type_vxlan.py

index e32738fa71b7f1880ed622f02830ed5e16fa51bb..627a3fcf8e27ab69eb3fc69b219286807254356e 100644 (file)
@@ -85,3 +85,7 @@ TYPE_NONE = 'none'
 
 # Values for network_type
 VXLAN_UDP_PORT = 4789
+
+# Network Type MTU overhead
+GRE_ENCAP_OVERHEAD = 42
+VXLAN_ENCAP_OVERHEAD = 50
index c8f7faf3fd9f62bcd5726c198e82aa56afd11f13..894a5c3d3019d0a4bce2c8b1dc12771a284a7f4b 100644 (file)
@@ -25,6 +25,7 @@ ID = 'id'
 NETWORK_TYPE = 'network_type'
 PHYSICAL_NETWORK = 'physical_network'
 SEGMENTATION_ID = 'segmentation_id'
+MTU = 'mtu'
 
 # The following keys are used in the binding level dictionaries
 # available via the binding_levels and original_binding_levels
@@ -142,6 +143,17 @@ class TypeDriver(object):
         """
         pass
 
+    @abc.abstractmethod
+    def get_mtu(self, physical):
+        """Get driver's network MTU.
+
+        :returns mtu: maximum transmission unit
+
+        Returns the mtu for the network based on the config values and
+        the network type.
+        """
+        pass
+
 
 @six.add_metaclass(abc.ABCMeta)
 class NetworkContext(object):
index cba7d99aac56981a523cf56b257da63e663d95c4..2404947d5203e079acb327066249d58339c11710 100644 (file)
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from oslo_config import cfg
 from oslo_db import exception as db_exc
 from oslo_log import log
 
 from neutron.common import exceptions as exc
+from neutron.common import utils
 from neutron.plugins.ml2 import driver_api as api
 
 
 LOG = log.getLogger(__name__)
 
 
-class TypeDriverHelper(api.TypeDriver):
-    """TypeDriver Helper for segment allocation.
+class BaseTypeDriver(api.TypeDriver):
+    """BaseTypeDriver for functions common to Segment and flat."""
+
+    def __init__(self):
+        try:
+            self.physnet_mtus = utils.parse_mappings(
+                cfg.CONF.ml2.physical_network_mtus
+            )
+        except Exception:
+            self.physnet_mtus = []
+
+    def get_mtu(self, physical_network=None):
+        return cfg.CONF.ml2.segment_mtu
+
+
+class SegmentTypeDriver(BaseTypeDriver):
+    """SegmentTypeDriver for segment allocation.
 
     Provide methods helping to perform segment allocation fully or partially
     specified.
     """
 
     def __init__(self, model):
+        super(SegmentTypeDriver, self).__init__()
         self.model = model
         self.primary_keys = set(dict(model.__table__.columns))
         self.primary_keys.remove("allocated")
index 73670daad5ce50b65701afc52a4c7a078a2ac20c..ed055f560838fe1d0efad19cfee611a9dbb4b5e5 100644 (file)
@@ -23,6 +23,7 @@ from neutron.db import model_base
 from neutron.i18n import _LI, _LW
 from neutron.plugins.common import constants as p_const
 from neutron.plugins.ml2 import driver_api as api
+from neutron.plugins.ml2.drivers import helpers
 
 LOG = log.getLogger(__name__)
 
@@ -50,7 +51,7 @@ class FlatAllocation(model_base.BASEV2):
                                  primary_key=True)
 
 
-class FlatTypeDriver(api.TypeDriver):
+class FlatTypeDriver(helpers.BaseTypeDriver):
     """Manage state for flat networks with ML2.
 
     The FlatTypeDriver implements the 'flat' network_type. Flat
@@ -62,6 +63,7 @@ class FlatTypeDriver(api.TypeDriver):
     """
 
     def __init__(self):
+        super(FlatTypeDriver, self).__init__()
         self._parse_networks(cfg.CONF.ml2_type_flat.flat_networks)
 
     def _parse_networks(self, entries):
@@ -112,6 +114,7 @@ class FlatTypeDriver(api.TypeDriver):
             except db_exc.DBDuplicateEntry:
                 raise exc.FlatNetworkInUse(
                     physical_network=physical_network)
+            segment[api.MTU] = self.get_mtu(alloc.physical_network)
         return segment
 
     def allocate_tenant_segment(self, session):
@@ -130,3 +133,12 @@ class FlatTypeDriver(api.TypeDriver):
         else:
             LOG.warning(_LW("No flat network found on physical network %s"),
                         physical_network)
+
+    def get_mtu(self, physical_network):
+        seg_mtu = super(FlatTypeDriver, self).get_mtu()
+        mtu = []
+        if seg_mtu > 0:
+            mtu.append(seg_mtu)
+        if physical_network in self.physnet_mtus:
+            mtu.append(int(self.physnet_mtus[physical_network]))
+        return min(mtu) if mtu else 0
index b5daeaa9e1ea58d4020494f749e913fad7d3ae2e..fe9b87a76832088a1eb61e584ab138f980446296 100644 (file)
@@ -166,3 +166,7 @@ class GreTypeDriver(type_tunnel.TunnelTypeDriver):
 
         with session.begin(subtransactions=True):
             session.query(GreEndpoints).filter_by(ip_address=ip).delete()
+
+    def get_mtu(self, physical_network=None):
+        mtu = super(GreTypeDriver, self).get_mtu(physical_network)
+        return mtu - p_const.GRE_ENCAP_OVERHEAD if mtu else 0
index d07b321b44c95e15ecaf7f3c91675af5c0be5016..3bb7e2493f3222e953ad1ad0c89b479d761b2099 100644 (file)
@@ -62,3 +62,6 @@ class LocalTypeDriver(api.TypeDriver):
     def release_segment(self, session, segment):
         # No resources to release
         pass
+
+    def get_mtu(self, physical_network=None):
+        pass
index eca978f913af09044bf9e7d999d469fda7c90dd9..68ffc3d3b06550ccdaf64db6cf56a437652b4a29 100644 (file)
@@ -14,6 +14,7 @@
 #    under the License.
 import abc
 
+from oslo_config import cfg
 from oslo_log import log
 
 from neutron.common import exceptions as exc
@@ -28,7 +29,7 @@ LOG = log.getLogger(__name__)
 TUNNEL = 'tunnel'
 
 
-class TunnelTypeDriver(helpers.TypeDriverHelper):
+class TunnelTypeDriver(helpers.SegmentTypeDriver):
     """Define stable abstract interface for ML2 type drivers.
 
     tunnel type networks rely on tunnel endpoints. This class defines abstract
@@ -145,7 +146,8 @@ class TunnelTypeDriver(helpers.TypeDriverHelper):
                 raise exc.TunnelIdInUse(tunnel_id=segmentation_id)
         return {api.NETWORK_TYPE: self.get_type(),
                 api.PHYSICAL_NETWORK: None,
-                api.SEGMENTATION_ID: getattr(alloc, self.segmentation_key)}
+                api.SEGMENTATION_ID: getattr(alloc, self.segmentation_key),
+                api.MTU: self.get_mtu()}
 
     def allocate_tenant_segment(self, session):
         alloc = self.allocate_partially_specified_segment(session)
@@ -153,7 +155,8 @@ class TunnelTypeDriver(helpers.TypeDriverHelper):
             return
         return {api.NETWORK_TYPE: self.get_type(),
                 api.PHYSICAL_NETWORK: None,
-                api.SEGMENTATION_ID: getattr(alloc, self.segmentation_key)}
+                api.SEGMENTATION_ID: getattr(alloc, self.segmentation_key),
+                api.MTU: self.get_mtu()}
 
     def release_segment(self, session, segment):
         tunnel_id = segment[api.SEGMENTATION_ID]
@@ -183,6 +186,15 @@ class TunnelTypeDriver(helpers.TypeDriverHelper):
                 filter_by(**{self.segmentation_key: tunnel_id}).
                 first())
 
+    def get_mtu(self, physical_network=None):
+        seg_mtu = super(TunnelTypeDriver, self).get_mtu()
+        mtu = []
+        if seg_mtu > 0:
+            mtu.append(seg_mtu)
+        if cfg.CONF.ml2.path_mtu > 0:
+            mtu.append(cfg.CONF.ml2.path_mtu)
+        return min(mtu) if mtu else 0
+
 
 class TunnelRpcCallbackMixin(object):
 
index bb3aafb7ad1ab8d96ec7d724ed93d3134e1319d6..c767bb6024d23c018754ce4f8850a61d620ce3f8 100644 (file)
@@ -73,7 +73,7 @@ class VlanAllocation(model_base.BASEV2):
     allocated = sa.Column(sa.Boolean, nullable=False)
 
 
-class VlanTypeDriver(helpers.TypeDriverHelper):
+class VlanTypeDriver(helpers.SegmentTypeDriver):
     """Manage state for VLAN networks with ML2.
 
     The VlanTypeDriver implements the 'vlan' network_type. VLAN
@@ -217,7 +217,8 @@ class VlanTypeDriver(helpers.TypeDriverHelper):
 
         return {api.NETWORK_TYPE: p_const.TYPE_VLAN,
                 api.PHYSICAL_NETWORK: alloc.physical_network,
-                api.SEGMENTATION_ID: alloc.vlan_id}
+                api.SEGMENTATION_ID: alloc.vlan_id,
+                api.MTU: self.get_mtu(alloc.physical_network)}
 
     def allocate_tenant_segment(self, session):
         alloc = self.allocate_partially_specified_segment(session)
@@ -225,7 +226,8 @@ class VlanTypeDriver(helpers.TypeDriverHelper):
             return
         return {api.NETWORK_TYPE: p_const.TYPE_VLAN,
                 api.PHYSICAL_NETWORK: alloc.physical_network,
-                api.SEGMENTATION_ID: alloc.vlan_id}
+                api.SEGMENTATION_ID: alloc.vlan_id,
+                api.MTU: self.get_mtu(alloc.physical_network)}
 
     def release_segment(self, session, segment):
         physical_network = segment[api.PHYSICAL_NETWORK]
@@ -258,3 +260,12 @@ class VlanTypeDriver(helpers.TypeDriverHelper):
                             "network %(physical_network)s"),
                         {'vlan_id': vlan_id,
                          'physical_network': physical_network})
+
+    def get_mtu(self, physical_network):
+        seg_mtu = super(VlanTypeDriver, self).get_mtu()
+        mtu = []
+        if seg_mtu > 0:
+            mtu.append(seg_mtu)
+        if physical_network in self.physnet_mtus:
+            mtu.append(int(self.physnet_mtus[physical_network]))
+        return min(mtu) if mtu else 0
index 39f60e061e62a7d58f91c94246a67a6f96a765a8..9d76c1727a07bb5f3150ab2d39a2a83fd7381660 100644 (file)
@@ -177,3 +177,7 @@ class VxlanTypeDriver(type_tunnel.TunnelTypeDriver):
 
         with session.begin(subtransactions=True):
             session.query(VxlanEndpoints).filter_by(ip_address=ip).delete()
+
+    def get_mtu(self, physical_network=None):
+        mtu = super(VxlanTypeDriver, self).get_mtu()
+        return mtu - p_const.VXLAN_ENCAP_OVERHEAD if mtu else 0
index 65cfadadf259c6770bfd8afc9b792fa74ea6108e..1d4a2162b42f932de4843e935fdb0e6014578b93 100644 (file)
@@ -165,6 +165,7 @@ class TypeManager(stevedore.named.NamedExtensionManager):
         """Call type drivers to create network segments."""
         segments = self._process_provider_create(network)
         session = context.session
+        mtu = []
         with session.begin(subtransactions=True):
             network_id = network['id']
             if segments:
@@ -173,9 +174,14 @@ class TypeManager(stevedore.named.NamedExtensionManager):
                         session, segment)
                     db.add_network_segment(session, network_id,
                                            segment, segment_index)
+                    if segment.get(api.MTU) > 0:
+                        mtu.append(segment[api.MTU])
             else:
                 segment = self.allocate_tenant_segment(session)
                 db.add_network_segment(session, network_id, segment)
+                if segment.get(api.MTU) > 0:
+                    mtu.append(segment[api.MTU])
+        network[api.MTU] = min(mtu) if mtu else 0
 
     def is_partial_segment(self, segment):
         network_type = segment[api.NETWORK_TYPE]
index 244ed7533a9501797abab1a4797377d5138773b0..119b673c745455286c9bbf5005dc8a8bd08ebb61 100644 (file)
@@ -585,6 +585,12 @@ class Ml2Plugin(db_base_plugin_v2.NeutronDbPluginV2,
             mech_context = driver_context.NetworkContext(self, context,
                                                          result)
             self.mechanism_manager.create_network_precommit(mech_context)
+
+            if net_data.get(api.MTU, 0) > 0:
+                res = super(Ml2Plugin, self).update_network(context,
+                    result['id'], network)
+                result[api.MTU] = res.get(api.MTU, 0)
+
         return result, mech_context
 
     @oslo_db_api.wrap_db_retry(max_retries=db_api.MAX_RETRIES,
index 4f65f17e26b0189d3615fa0c7559c0e1080bc320..1e84078d3c336b2c2179340c0adb0e6a5a308391 100644 (file)
 from neutron.common import exceptions as exc
 import neutron.db.api as db
 from neutron.plugins.common import constants as p_const
+from neutron.plugins.ml2 import config
 from neutron.plugins.ml2 import driver_api as api
 from neutron.plugins.ml2.drivers import type_flat
 from neutron.tests.unit import testlib_api
-from oslo_config import cfg
 
 
 FLAT_NETWORKS = ['flat_net1', 'flat_net2']
@@ -29,10 +29,11 @@ class FlatTypeTest(testlib_api.SqlTestCase):
 
     def setUp(self):
         super(FlatTypeTest, self).setUp()
-        cfg.CONF.set_override('flat_networks', FLAT_NETWORKS,
+        config.cfg.CONF.set_override('flat_networks', FLAT_NETWORKS,
                               group='ml2_type_flat')
         self.driver = type_flat.FlatTypeDriver()
         self.session = db.get_session()
+        self.driver.physnet_mtus = []
 
     def _get_allocation(self, session, segment):
         return session.query(type_flat.FlatAllocation).filter_by(
@@ -111,3 +112,24 @@ class FlatTypeTest(testlib_api.SqlTestCase):
     def test_allocate_tenant_segment(self):
         observed = self.driver.allocate_tenant_segment(self.session)
         self.assertIsNone(observed)
+
+    def test_get_mtu(self):
+        config.cfg.CONF.set_override('segment_mtu', 1475, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 1400, group='ml2')
+        self.driver.physnet_mtus = {'physnet1': 1450, 'physnet2': 1400}
+        self.assertEqual(1450, self.driver.get_mtu('physnet1'))
+
+        config.cfg.CONF.set_override('segment_mtu', 1375, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 1400, group='ml2')
+        self.driver.physnet_mtus = {'physnet1': 1450, 'physnet2': 1400}
+        self.assertEqual(1375, self.driver.get_mtu('physnet1'))
+
+        config.cfg.CONF.set_override('segment_mtu', 0, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 1425, group='ml2')
+        self.driver.physnet_mtus = {'physnet1': 1450, 'physnet2': 1400}
+        self.assertEqual(1400, self.driver.get_mtu('physnet2'))
+
+        config.cfg.CONF.set_override('segment_mtu', 0, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 0, group='ml2')
+        self.driver.physnet_mtus = {}
+        self.assertEqual(0, self.driver.get_mtu('physnet1'))
index 105f25b734b8e99df2be2c651d97c2ad9128bb1f..933da29361d0972cf22d3851daf62ff4f6b4a3a9 100644 (file)
@@ -21,6 +21,7 @@ import testtools
 
 from neutron.db import api as db_api
 from neutron.plugins.common import constants as p_const
+from neutron.plugins.ml2 import config
 from neutron.plugins.ml2.drivers import type_gre
 from neutron.tests.unit.ml2 import test_rpcapi
 from neutron.tests.unit.ml2 import test_type_tunnel
@@ -125,6 +126,30 @@ class GreTypeTest(test_type_tunnel.TunnelTypeTestMixin,
         with testtools.ExpectedException(sa_exc.NoResultFound):
             _get_allocation(session, 1)
 
+    def test_get_mtu(self):
+        config.cfg.CONF.set_override('segment_mtu', 1500, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 1475, group='ml2')
+        self.driver.physnet_mtus = {'physnet1': 1450, 'physnet2': 1400}
+        self.assertEqual(1475 - p_const.GRE_ENCAP_OVERHEAD,
+                         self.driver.get_mtu('physnet1'))
+
+        config.cfg.CONF.set_override('segment_mtu', 1425, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 1475, group='ml2')
+        self.driver.physnet_mtus = {'physnet1': 1400, 'physnet2': 1400}
+        self.assertEqual(1425 - p_const.GRE_ENCAP_OVERHEAD,
+                         self.driver.get_mtu('physnet1'))
+
+        config.cfg.CONF.set_override('segment_mtu', 0, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 1475, group='ml2')
+        self.driver.physnet_mtus = {'physnet1': 1450, 'physnet2': 1425}
+        self.assertEqual(1475 - p_const.GRE_ENCAP_OVERHEAD,
+                         self.driver.get_mtu('physnet2'))
+
+        config.cfg.CONF.set_override('segment_mtu', 0, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 0, group='ml2')
+        self.driver.physnet_mtus = {}
+        self.assertEqual(0, self.driver.get_mtu('physnet1'))
+
 
 class GreTypeMultiRangeTest(test_type_tunnel.TunnelTypeMultiRangeTestMixin,
                             testlib_api.SqlTestCase):
index c5586ad952cbb03114c94ddcc5dacc7fcbcec346..0444285d7dc2e57c98713210be3b4742aa1d9027 100644 (file)
@@ -20,10 +20,10 @@ from neutron.common import exceptions as exc
 import neutron.db.api as db
 from neutron.plugins.common import constants as p_const
 from neutron.plugins.common import utils as plugin_utils
+from neutron.plugins.ml2 import config
 from neutron.plugins.ml2 import driver_api as api
 from neutron.plugins.ml2.drivers import type_vlan
 from neutron.tests.unit import testlib_api
-from oslo_config import cfg
 
 PROVIDER_NET = 'phys_net1'
 TENANT_NET = 'phys_net2'
@@ -41,13 +41,15 @@ class VlanTypeTest(testlib_api.SqlTestCase):
 
     def setUp(self):
         super(VlanTypeTest, self).setUp()
-        cfg.CONF.set_override('network_vlan_ranges', NETWORK_VLAN_RANGES,
-                              group='ml2_type_vlan')
+        config.cfg.CONF.set_override('network_vlan_ranges',
+                                     NETWORK_VLAN_RANGES,
+                                     group='ml2_type_vlan')
         self.network_vlan_ranges = plugin_utils.parse_network_vlan_ranges(
             NETWORK_VLAN_RANGES)
         self.driver = type_vlan.VlanTypeDriver()
         self.driver._sync_vlan_allocations()
         self.session = db.get_session()
+        self.driver.physnet_mtus = []
 
     def test_parse_network_exception_handling(self):
         with mock.patch.object(plugin_utils,
@@ -202,6 +204,27 @@ class VlanTypeTest(testlib_api.SqlTestCase):
                           self.session,
                           segment)
 
+    def test_get_mtu(self):
+        config.cfg.CONF.set_override('segment_mtu', 1475, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 1400, group='ml2')
+        self.driver.physnet_mtus = {'physnet1': 1450, 'physnet2': 1400}
+        self.assertEqual(1450, self.driver.get_mtu('physnet1'))
+
+        config.cfg.CONF.set_override('segment_mtu', 1375, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 1400, group='ml2')
+        self.driver.physnet_mtus = {'physnet1': 1450, 'physnet2': 1400}
+        self.assertEqual(1375, self.driver.get_mtu('physnet1'))
+
+        config.cfg.CONF.set_override('segment_mtu', 0, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 1400, group='ml2')
+        self.driver.physnet_mtus = {'physnet1': 1450, 'physnet2': 1400}
+        self.assertEqual(1450, self.driver.get_mtu('physnet1'))
+
+        config.cfg.CONF.set_override('segment_mtu', 0, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 0, group='ml2')
+        self.driver.physnet_mtus = {}
+        self.assertEqual(0, self.driver.get_mtu('physnet1'))
+
     def test_allocate_tenant_segment(self):
         for __ in range(VLAN_MIN, VLAN_MAX + 1):
             segment = self.driver.allocate_tenant_segment(self.session)
index b794261b2ac6b47f19af6d14fee49bbcbe6bfea8..3487c7f4534863799207cf8928ba9b9e149a99d6 100644 (file)
@@ -16,6 +16,7 @@
 import mock
 
 from neutron.plugins.common import constants as p_const
+from neutron.plugins.ml2 import config
 from neutron.plugins.ml2.drivers import type_vxlan
 from neutron.tests.unit.ml2 import test_rpcapi
 from neutron.tests.unit.ml2 import test_type_tunnel
@@ -93,6 +94,30 @@ class VxlanTypeTest(test_type_tunnel.TunnelTypeTestMixin,
         endpoints = self.driver.get_endpoints()
         self.assertNotIn(TUNNEL_IP_ONE, endpoints)
 
+    def test_get_mtu(self):
+        config.cfg.CONF.set_override('segment_mtu', 1500, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 1475, group='ml2')
+        self.driver.physnet_mtus = {'physnet1': 1450, 'physnet2': 1400}
+        self.assertEqual(1475 - p_const.VXLAN_ENCAP_OVERHEAD,
+                         self.driver.get_mtu('physnet1'))
+
+        config.cfg.CONF.set_override('segment_mtu', 1450, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 1475, group='ml2')
+        self.driver.physnet_mtus = {'physnet1': 1400, 'physnet2': 1425}
+        self.assertEqual(1450 - p_const.VXLAN_ENCAP_OVERHEAD,
+                         self.driver.get_mtu('physnet1'))
+
+        config.cfg.CONF.set_override('segment_mtu', 0, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 1450, group='ml2')
+        self.driver.physnet_mtus = {'physnet1': 1425, 'physnet2': 1400}
+        self.assertEqual(1450 - p_const.VXLAN_ENCAP_OVERHEAD,
+                         self.driver.get_mtu('physnet1'))
+
+        config.cfg.CONF.set_override('segment_mtu', 0, group='ml2')
+        config.cfg.CONF.set_override('path_mtu', 0, group='ml2')
+        self.driver.physnet_mtus = {}
+        self.assertEqual(0, self.driver.get_mtu('physnet1'))
+
 
 class VxlanTypeMultiRangeTest(test_type_tunnel.TunnelTypeMultiRangeTestMixin,
                               testlib_api.SqlTestCase):