Skip to content
Snippets Groups Projects
Verified Commit 3e940367 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

update behaviour of migrate_to_different_site in IP Trunk migration

parent 570470f0
No related branches found
No related tags found
1 merge request!140Feature/update iptrunk migration input form
...@@ -85,8 +85,8 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator: ...@@ -85,8 +85,8 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
current_router_site = Router.from_subscription(router_id).router.router_site.subscription current_router_site = Router.from_subscription(router_id).router.router_site.subscription
old_side_site = Router.from_subscription(migrate_form_input.replace_side).router.router_site old_side_site = Router.from_subscription(migrate_form_input.replace_side).router.router_site
if ( if (
migrate_form_input.migrate_to_different_site not migrate_form_input.migrate_to_different_site
and current_router_site.subscription_id == old_side_site.owner_subscription_id and current_router_site.subscription_id != old_side_site.owner_subscription_id
): ):
continue continue
routers[str(router_id)] = router["description"] routers[str(router_id)] = router["description"]
......
...@@ -76,6 +76,7 @@ def migrate_form_input( ...@@ -76,6 +76,7 @@ def migrate_form_input(
{ {
"tt_number": faker.tt_number(), "tt_number": faker.tt_number(),
"replace_side": replace_side, "replace_side": replace_side,
"migrate_to_different_site": True,
}, },
{ {
"new_node": new_router, "new_node": new_router,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment