V2T migration: fix api-repaly for ipv6 subnets

Change-Id: Ie967b2d0925141892a42a72c7d6d4da06230958a
This commit is contained in:
asarfaty 2021-02-17 14:05:14 +02:00
parent d01d32683b
commit 5499b5da41
1 changed files with 5 additions and 0 deletions

View File

@ -260,6 +260,11 @@ class PrepareObjectForMigration(object):
for field in v6_fields_to_remove:
if field in body:
body.pop(field)
else:
# For ipv6 mode - remove those only if empty
for field in v6_fields_to_remove:
if field in body and body[field] is None:
body.pop(field)
return body
def prepare_port(self, port, remove_qos=False, direct_call=False):