Loading src/realizer/restconf/service_types/builders/configure_match_criteria.py +4 −2 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ def configure_match_criteria(network_access, site, sdp, layer_type): MATCH_TYPE_MAPPING["source-ip-prefix"] = "ipv4-src-prefix" MATCH_TYPE_MAPPING["destination-ip-prefix"] = "ipv4-dst-prefix" MATCH_TYPE_MAPPING["vlan"] = "vlan" # Need to check if applies with l2 too MATCH_TYPE_MAPPING["any"] = "any" # Need to check if applies with l2 too match_criteria = sdp.get("match_criteria") if not match_criteria: Loading @@ -46,7 +47,7 @@ def configure_match_criteria(network_access, site, sdp, layer_type): prefix_length = safe_get(sdp, ["sdp", "attachment-circuits", "attachment-circuit", 0, "ac-ipv4-prefix-length"]) lan = f"{provider_address}/{prefix_length}" if provider_address and prefix_length else None if match_type != "vlan": if match_type != "vlan" and match_type != "any": rule = { "id": f"match-{match_type}-{index}", "match-flow": { Loading @@ -55,7 +56,8 @@ def configure_match_criteria(network_access, site, sdp, layer_type): } network_access["service"]["qos"]["qos-classification-policy"]["rule"].append(rule) else: elif match_type == "vlan": site["routing-protocols"] = {"routing-protocol": []} # Handle VLAN match criteria routing_protocol = { "type": "static", Loading Loading
src/realizer/restconf/service_types/builders/configure_match_criteria.py +4 −2 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ def configure_match_criteria(network_access, site, sdp, layer_type): MATCH_TYPE_MAPPING["source-ip-prefix"] = "ipv4-src-prefix" MATCH_TYPE_MAPPING["destination-ip-prefix"] = "ipv4-dst-prefix" MATCH_TYPE_MAPPING["vlan"] = "vlan" # Need to check if applies with l2 too MATCH_TYPE_MAPPING["any"] = "any" # Need to check if applies with l2 too match_criteria = sdp.get("match_criteria") if not match_criteria: Loading @@ -46,7 +47,7 @@ def configure_match_criteria(network_access, site, sdp, layer_type): prefix_length = safe_get(sdp, ["sdp", "attachment-circuits", "attachment-circuit", 0, "ac-ipv4-prefix-length"]) lan = f"{provider_address}/{prefix_length}" if provider_address and prefix_length else None if match_type != "vlan": if match_type != "vlan" and match_type != "any": rule = { "id": f"match-{match_type}-{index}", "match-flow": { Loading @@ -55,7 +56,8 @@ def configure_match_criteria(network_access, site, sdp, layer_type): } network_access["service"]["qos"]["qos-classification-policy"]["rule"].append(rule) else: elif match_type == "vlan": site["routing-protocols"] = {"routing-protocol": []} # Handle VLAN match criteria routing_protocol = { "type": "static", Loading