From cfb4f0bdde2c49f46a784bf51ceed1f576aeae49 Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Tue, 20 Apr 2021 12:06:17 -0700 Subject: [PATCH] [V2T] Fail pre-checks for flat networks NSX-V flat networks do not have a corresponding provider network type in NSX-T and should therefore not be migrated, just like networks of type portgroup. Change-Id: I6e5e94473310eb4da3c14ba9c08dc1af4927b5bb --- vmware_nsx/shell/admin/plugins/nsxv/resources/migration.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vmware_nsx/shell/admin/plugins/nsxv/resources/migration.py b/vmware_nsx/shell/admin/plugins/nsxv/resources/migration.py index 70b2f3589e..71bd150a2c 100644 --- a/vmware_nsx/shell/admin/plugins/nsxv/resources/migration.py +++ b/vmware_nsx/shell/admin/plugins/nsxv/resources/migration.py @@ -141,10 +141,12 @@ def _validate_networks(plugin, admin_context, transit_networks): if plugin._network_is_external(admin_context, net['id']): continue - # portgroup provider networks are not ssupported + # portgroup provider networks are not supported + # This includes FLAT and PORTGROUP networks net_type = net.get(pnet.NETWORK_TYPE) overlay_net = bool(net_type != c_utils.NsxVNetworkTypes.VLAN) - if net_type == c_utils.NsxVNetworkTypes.PORTGROUP: + if (net_type in [c_utils.NsxVNetworkTypes.PORTGROUP, + c_utils.NsxVNetworkTypes.FLAT]): log_error("Network %s of type %s is not supported." % (net['id'], net_type))