Change order of MP2P migration

Ensure resources are migrated in the expected order.

Change-Id: Ie8361af6a5bcecea0757c8c04fef85f548db3a06
This commit is contained in:
Salvatore Orlando 2021-09-08 06:32:46 -07:00
parent 586a98bf4e
commit 040ee02e2a
1 changed files with 15 additions and 5 deletions

View File

@ -1320,19 +1320,29 @@ def migrate_t_resources_2_p(nsxlib, nsxpolicy, plugin,
start_migration_process(nsxlib)
# Migration order derives from the dependencies between resources
public_switches, tier0s = migrate_tier0s(nsxlib, nsxpolicy, plugin)
migrate_md_proxies(nsxlib, nsxpolicy, plugin)
migrate_switch_profiles(nsxlib, nsxpolicy, plugin)
migrate_groups(nsxlib, nsxpolicy)
# Migrate DHCP server
migrate_dhcp_servers(nsxlib, nsxpolicy)
# Migrate Tier0 routers
public_switches, tier0s = migrate_tier0s(nsxlib, nsxpolicy, plugin)
# Migrate Tier1 routers
mp_routers = migrate_routers(nsxlib, nsxpolicy)
# Migrate switch profiles
migrate_switch_profiles(nsxlib, nsxpolicy, plugin)
# Migrate MD Proxies
migrate_md_proxies(nsxlib, nsxpolicy, plugin)
# Migrate logical switches
mp_networks = migrate_networks(nsxlib, nsxpolicy, plugin,
public_switches)
# Migrate logical ports including Tier1 router ports
migrate_ports(nsxlib, nsxpolicy, plugin, mp_networks)
# Migrate static routes and NAT config
migrate_routers_config(nsxlib, nsxpolicy, plugin, mp_routers)
# Migrate Tier0 router ports and configuration
migrate_tier0_config(nsxlib, nsxpolicy, tier0s)
# Migrate NS groups
migrate_groups(nsxlib, nsxpolicy)
# Migrate Lb profiles, monitors, pools, virtual servers, and services
migrate_lb_resources(nsxlib, nsxpolicy)
# Migrate firewall sections last as those take the longest to rollback
# in case of error
migrate_dfw_sections(nsxlib, nsxpolicy, plugin)