From 8c4cc1e766b5a86b87530d80bb43cfca03aa8e86 Mon Sep 17 00:00:00 2001 From: hajipour <shajipour@cttc.es> Date: Mon, 13 Jan 2025 12:51:59 +0100 Subject: [PATCH] prefix added to lan value in ipv4-lan-prefixes --- .../L3NM_IETFL3VPN_ServiceHandler.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py index 64423129d..fb4af6cd2 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py @@ -54,8 +54,8 @@ class LANPrefixesDict(TypedDict): class Ipv4Info(TypedDict): - src_ip: str - dst_ip: str + src_lan: str + dst_lan: str src_port: str dst_port: str vlan: str @@ -144,9 +144,9 @@ def extract_match_criterion_ipv4_info( ) -> Ipv4Info: for type_value in match_criterion["match-type"]: if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": - src_ip = type_value["value"][0].split("/")[0] + src_lan = type_value["value"][0] elif type_value["type"] == "ietf-network-slice-service:destination-ip-prefix": - dst_ip = type_value["value"][0].split("/")[0] + dst_lan = type_value["value"][0] elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": src_port = type_value["value"][0] elif type_value["type"] == "ietf-network-slice-service:destination-tcp-port": @@ -154,8 +154,8 @@ def extract_match_criterion_ipv4_info( elif type_value["type"] == "ietf-network-slice-service:vlan": vlan = type_value["value"][0] return Ipv4Info( - src_ip=src_ip, - dst_ip=dst_ip, + src_lan=src_lan, + dst_lan=dst_lan, src_port=src_port, dst_port=dst_port, vlan=vlan, @@ -313,13 +313,13 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): ) src_ipv4_lan_prefixes = [ LANPrefixesDict( - lan=src_match_criterion_ipv4_info["dst_ip"], + lan=src_match_criterion_ipv4_info["dst_lan"], lan_tag=src_match_criterion_ipv4_info["vlan"], ) ] dst_ipv4_lan_prefixes = [ LANPrefixesDict( - lan=dst_match_criterion_ipv4_info["dst_ip"], + lan=dst_match_criterion_ipv4_info["dst_lan"], lan_tag=dst_match_criterion_ipv4_info["vlan"], ) ] -- GitLab