V2T migration: Skip public networks in validation
And skip octavia statistics updates in api_replay Change-Id: Icb7f83403979db16b4b9eb6e3136ba4ebb9436e6
This commit is contained in:
parent
09fbad47d8
commit
c9fab7b2fe
@ -893,7 +893,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
|
||||
@ -917,7 +917,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,
|
||||
@ -930,6 +930,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(
|
||||
|
@ -118,10 +118,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…
Reference in New Issue
Block a user