Browse Source

V2T migration: Skip public networks in validation

And skip octavia statistics updates in api_replay

Change-Id: Icb7f83403979db16b4b9eb6e3136ba4ebb9436e6
changes/66/762466/1
asarfaty 2 months ago
committed by Adit Sarfaty
parent
commit
208d29868c
2 changed files with 11 additions and 3 deletions
  1. +6
    -2
      vmware_nsx/api_replay/client.py
  2. +5
    -1
      vmware_nsx/shell/admin/plugins/nsxv/resources/migration.py

+ 6
- 2
vmware_nsx/api_replay/client.py View File

@ -895,7 +895,7 @@ class ApiReplayClient(utils.PrepareObjectForMigration):
def migrate_octavia(self):
"""Migrates Octavia NSX objects to the new neutron driver.
The Octavia proccess & DB will remain unchanged.
The Octavia process & DB will remain unchanged.
Using RPC connection to connect directly with the new plugin driver.
"""
# Read all existing octavia resources
@ -919,7 +919,7 @@ class ApiReplayClient(utils.PrepareObjectForMigration):
self.octavia_rpc_client = messaging.RPCClient(transport, target)
# Initialize RPC listener for getting status updates from the driver
# so that the rsource status will not change in the octavia DB
# so that the resource status will not change in the octavia DB
topic = d_const.DRIVER_TO_OCTAVIA_MIGRATION_TOPIC
server = socket.gethostname()
target = messaging.Target(topic=topic, server=server,
@ -932,6 +932,10 @@ class ApiReplayClient(utils.PrepareObjectForMigration):
# Do nothing
pass
def update_listener_statistics(self, **kw):
# Do nothing
pass
endpoints = [MigrationOctaviaDriverEndpoint]
access_policy = dispatcher.DefaultRPCAccessPolicy
self.octavia_rpc_server = messaging.get_rpc_server(


+ 5
- 1
vmware_nsx/shell/admin/plugins/nsxv/resources/migration.py View File

@ -116,10 +116,14 @@ def validate_config_for_migration(resource, event, trigger, **kwargs):
# Networks & subnets validations:
networks = plugin.get_networks(admin_context)
for net in networks:
# skip internal networks
# Skip internal networks
if net['project_id'] == nsxv_constants.INTERNAL_TENANT_ID:
continue
# Skip public networks
if plugin._network_is_external(admin_context, net['id']):
continue
# VXLAN or portgroup provider networks
net_type = net.get(pnet.NETWORK_TYPE)
if (net_type == c_utils.NsxVNetworkTypes.VXLAN or


Loading…
Cancel
Save