Skip to content

Commit

Permalink
fixing code
Browse files Browse the repository at this point in the history
  • Loading branch information
Vibhu-gslab committed Jul 17, 2024
1 parent b34af8a commit 90ff525
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,15 @@ def _get_vtep_diagnostic_loopback_for_vrf(self: AvdStructuredConfigNetworkServic

loopback_ipv4_pool = ""
loopback_ipv6_pool = ""
pod_name = self.shared_utils.pod_name
loopback_ip_pools = get(vrf, "vtep_diagnostic.loopback_ip_pools")
if (loopback_ipv4_pool := get(vrf, "vtep_diagnostic.loopback_ip_range")) is None:
pod_name = self.shared_utils.pod_name
loopback_ip_pools = get(vrf, "vtep_diagnostic.loopback_ip_pools")
if pod_name and loopback_ip_pools:
loopback_ipv4_pool = get_item(loopback_ip_pools, "pod", pod_name, default={}).get("ipv4_pool")

if (loopback_ipv6_pool := get(vrf, "vtep_diagnostic.loopback_ipv6_range")) is None:
pod_name = self.shared_utils.pod_name
loopback_ipv6_pools = get(vrf, "vtep_diagnostic.loopback_ip_pools")
if pod_name and loopback_ipv6_pools:
loopback_ipv6_pool = get_item(loopback_ipv6_pools, "pod", pod_name, default={}).get("ipv6_pool")
if pod_name and loopback_ip_pools:
loopback_ipv6_pool = get_item(loopback_ip_pools, "pod", pod_name, default={}).get("ipv6_pool")

if not loopback_ipv4_pool and not loopback_ipv6_pool:
return None
Expand Down

0 comments on commit 90ff525

Please sign in to comment.