Merge "V2T migration: Support vlan networks migration" into stable/train

This commit is contained in:
Zuul 2021-02-14 17:34:53 +00:00 committed by Gerrit Code Review
commit cec2c15377
2 changed files with 8 additions and 1 deletions

View File

@ -193,6 +193,12 @@ class PrepareObjectForMigration(object):
if 'provider:physical_network' in body:
del body['provider:physical_network']
# For VLAN network we are removing the physical_network so the default
# vlan TAZ will be used by the plugin
if (body.get('provider:network_type') == 'vlan'):
if 'provider:physical_network' in body:
del body['provider:physical_network']
# external networks needs some special care
if body.get('router:external'):
fields_reset = False

View File

@ -646,7 +646,8 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
kwargs['metadata_proxy_id'] = az._native_md_proxy_uuid
# Set the segment vni for nsx-v portgroups migration
if request_data.get('vni') and cfg.CONF.api_replay_mode:
if (cfg.CONF.api_replay_mode and
validators.is_attr_set(request_data.get('vni'))):
kwargs['overlay_id'] = request_data['vni']
self.nsxpolicy.segment.create_or_overwrite(