Skip to content
Snippets Groups Projects
Commit cd49961f authored by Karel van Klink's avatar Karel van Klink :smiley_cat: Committed by Aleksandr Kurbatov
Browse files

update IP address selection for v6

parent 4ef56d26
No related branches found
No related tags found
1 merge request!173Update IPtrunk migration IPAM step behaviour
Pipeline #85902 passed
...@@ -410,7 +410,7 @@ def register_dns_records(subscription: IptrunkInactive) -> State: ...@@ -410,7 +410,7 @@ def register_dns_records(subscription: IptrunkInactive) -> State:
msg = f"Missing IP resources in trunk, cannot allocate DNS record for side {fqdn}!" msg = f"Missing IP resources in trunk, cannot allocate DNS record for side {fqdn}!"
raise ValueError(msg) raise ValueError(msg)
ipv4_addr = subscription.iptrunk.iptrunk_ipv4_network[index] ipv4_addr = subscription.iptrunk.iptrunk_ipv4_network[index]
ipv6_addr = subscription.iptrunk.iptrunk_ipv6_network[index] ipv6_addr = subscription.iptrunk.iptrunk_ipv6_network[index + 1]
infoblox.create_host_by_ip(fqdn, ipv4_addr, ipv6_addr, "TRUNK", str(subscription.subscription_id)) infoblox.create_host_by_ip(fqdn, ipv4_addr, ipv6_addr, "TRUNK", str(subscription.subscription_id))
......
...@@ -548,7 +548,8 @@ def update_ipam(subscription: Iptrunk, replace_index: int, new_node: Router, new ...@@ -548,7 +548,8 @@ def update_ipam(subscription: Iptrunk, replace_index: int, new_node: Router, new
Move the DNS record pointing to the old side of the trunk, to the new side. Move the DNS record pointing to the old side of the trunk, to the new side.
""" """
v4_addr = subscription.iptrunk.iptrunk_ipv4_network[replace_index] v4_addr = subscription.iptrunk.iptrunk_ipv4_network[replace_index]
v6_addr = subscription.iptrunk.iptrunk_ipv6_network[replace_index] # IPv6 networks start with an unused address we need to skip past.
v6_addr = subscription.iptrunk.iptrunk_ipv6_network[replace_index + 1]
# Out with the old # Out with the old
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment