Skip to content
Snippets Groups Projects
Commit 32644ffb authored by Shayan Hajipour's avatar Shayan Hajipour
Browse files

Merge branch 'feat/242-cttc-l3slice-ietfslice-service-handler-is-required'...

Merge branch 'feat/242-cttc-l3slice-ietfslice-service-handler-is-required' into camara-demo-integration
parents eec07a34 e0ee4da4
No related branches found
No related tags found
2 merge requests!359Release TeraFlowSDN 5.0,!321Resolve: "(CTTC) CAMARA Demo Integration tests"
...@@ -40,8 +40,8 @@ from .ConfigRules import ( ...@@ -40,8 +40,8 @@ from .ConfigRules import (
class Ipv4Info(TypedDict): class Ipv4Info(TypedDict):
src_ip: str src_lan: str
dst_ip: str dst_lan: str
src_port: str src_port: str
dst_port: str dst_port: str
vlan: str vlan: str
...@@ -254,9 +254,9 @@ def extract_match_criterion_ipv4_info( ...@@ -254,9 +254,9 @@ def extract_match_criterion_ipv4_info(
) -> Ipv4Info: ) -> Ipv4Info:
for type_value in match_criterion["match-type"]: for type_value in match_criterion["match-type"]:
if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": if type_value["type"] == "ietf-network-slice-service:source-ip-prefix":
src_ip = type_value["value"][0] src_lan = type_value["value"][0]
elif type_value["type"] == "ietf-network-slice-service:destination-ip-prefix": elif type_value["type"] == "ietf-network-slice-service:destination-ip-prefix":
dst_ip = type_value["value"][0] dst_lan = type_value["value"][0]
elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": elif type_value["type"] == "ietf-network-slice-service:source-tcp-port":
src_port = type_value["value"][0] src_port = type_value["value"][0]
elif type_value["type"] == "ietf-network-slice-service:destination-tcp-port": elif type_value["type"] == "ietf-network-slice-service:destination-tcp-port":
...@@ -264,8 +264,8 @@ def extract_match_criterion_ipv4_info( ...@@ -264,8 +264,8 @@ def extract_match_criterion_ipv4_info(
elif type_value["type"] == "ietf-network-slice-service:vlan": elif type_value["type"] == "ietf-network-slice-service:vlan":
vlan = type_value["value"][0] vlan = type_value["value"][0]
return Ipv4Info( return Ipv4Info(
src_ip=src_ip, src_lan=src_lan,
dst_ip=dst_ip, dst_lan=dst_lan,
src_port=src_port, src_port=src_port,
dst_port=dst_port, dst_port=dst_port,
vlan=vlan, vlan=vlan,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment