From 90ff525f3cf162bc278e28d3ade471949d1f66be Mon Sep 17 00:00:00 2001 From: Vibhu-gslab Date: Wed, 17 Jul 2024 17:20:56 +0530 Subject: [PATCH] fixing code --- .../network_services/loopback_interfaces.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/python-avd/pyavd/_eos_designs/structured_config/network_services/loopback_interfaces.py b/python-avd/pyavd/_eos_designs/structured_config/network_services/loopback_interfaces.py index 5e3b6d9a669..df74b2e4243 100644 --- a/python-avd/pyavd/_eos_designs/structured_config/network_services/loopback_interfaces.py +++ b/python-avd/pyavd/_eos_designs/structured_config/network_services/loopback_interfaces.py @@ -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