Skip to content
Snippets Groups Projects
Commit 8ccf4d06 authored by Pelle Koster's avatar Pelle Koster
Browse files

FIX: gws mapping based on interface-name and not sap-id

parent 1a2c513f
No related branches found
No related tags found
No related merge requests found
......@@ -448,9 +448,9 @@ def get_all_bgp_peers(netconf_config):
def get_gws_indirect_filters(netconf_config):
for sap in netconf_config.xpath(
'configure/service/vprn[service-name/text()="IAS"]'
"/interface/sap[egress/filter/ip]"
"/interface[sap/egress/filter/ip]"
):
yield {
"interface": sap.find("sap-id").text,
"ip_filter": sap.find("egress/filter/ip").text,
"interface": sap.find("interface-name").text.lower(),
"ip_filter": sap.find("sap/egress/filter/ip").text,
}
......@@ -1149,6 +1149,6 @@ def test_refresh_nokia_gws_indirect_ip_filters(
result = json.loads(r.get(f"nokia-ip-filters:{hostname}"))
assert result == {
"lag-11:333": "NREN_IAS_DFN_OUT",
"lag-17:252": "NREN_IAS_REDIRIS_OUT",
"lag-11.333": "NREN_IAS_DFN_OUT",
"lag-17.252": "NREN_IAS_REDIRIS_OUT",
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment