Skip to content

Commit

Permalink
Update 502_policy_vrf_lite_cross_reference.py
Browse files Browse the repository at this point in the history
update class check_global_ospf_nssa: remove list
  • Loading branch information
ccoueffe authored Nov 15, 2024
1 parent 11dc537 commit 4baec66
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ def check_global_ospf_nssa(cls, area, policy):
Check NSSA parameters
"""
if "nssa" in area:
if "translate" in area["nssa"][0]:
translate = area["nssa"][0]["translate"][0]
if "translate" in area["nssa"]:
translate = area["nssa"]["translate"]
if "never" in translate and translate["never"] is True:
if ("supress_fa" in translate or "always" in translate) and (
translate["supress_fa"] is True or translate["always"] is True
Expand All @@ -142,9 +142,9 @@ def check_global_ospf_nssa(cls, area, policy):
f"vxlan.overlay_extensions.vrf_lites.{policy}.ospf.areas.id.{area['id']}. "
f"NSSA translate type 7 never, cannot be enabled with always or supress"
)
if "route_map" in area["nssa"][0] and (
"default_information_originate" not in area["nssa"][0]
or area["nssa"][0]["default_information_originate"] is False
if "route_map" in area["nssa"] and (
"default_information_originate" not in area["nssa"]
or area["nssa"]["default_information_originate"] is False
):
cls.results.append(
f"vxlan.overlay_extensions.vrf_lites.{policy}.ospf.areas.id.{area['id']}. "
Expand Down

0 comments on commit 4baec66

Please sign in to comment.