infamy: route: Add function to check if an area is NSSA

This commit is contained in:
Mattias Walström
2024-01-15 16:29:06 +01:00
committed by Joachim Wiberg
parent 9788046c64
commit b799366d0a
+8
View File
@@ -79,3 +79,11 @@ def ospf_get_interface_type(target, area_id, ifname):
def ospf_get_interface_passive(target, area_id, ifname):
ospf_interface=_get_ospf_status_area_interface(target,area_id,ifname)
return ospf_interface.get("passive", False)
def ospf_is_area_nssa(target, area_id):
area=_get_ospf_status_area(target, area_id)
if area.get("area-type", "") == "ietf-ospf:nssa-area":
return True
return False