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

debug:

- delay and bandwidth passed as integer instead of str in IETF Slice model
- packet_loss passed as float instead of str in IETF Slice model
- ip and prefix passed to the SBI IETF Slice model instead of only ip
parent c2715468
No related branches found
No related tags found
1 merge request!307Resolve "(CTTC) L3Slice-IETFSlice Service Handler is Required"
......@@ -43,9 +43,9 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]:
dst_destination_ip_prefix: str = json_settings["dst_destination_ip_prefix"]
dst_destination_tcp_port: str = json_settings["dst_destination_tcp_port"]
slice_id: str = json_settings["slice_id"]
delay: str = json_settings["delay"]
bandwidth: str = json_settings["bandwidth"]
packet_loss: str = json_settings["packet_loss"]
delay: str = int(json_settings["delay"])
bandwidth: str = int(json_settings["bandwidth"])
packet_loss: str = float(json_settings["packet_loss"])
sdps = [
{
......
......@@ -106,9 +106,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_ip = type_value["value"][0]
elif type_value["type"] == "ietf-network-slice-service:destination-ip-prefix":
dst_ip = type_value["value"][0].split("/")[0]
dst_ip = 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":
......@@ -217,7 +217,9 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler):
running_resource_value_dict = json.loads(
running_ietf_slice_cr.custom.resource_value
)
slice_name = running_resource_value_dict["network-slice-services"]['slice-service'][0]['id']
slice_name = running_resource_value_dict["network-slice-services"][
"slice-service"
][0]["id"]
if not running_candidate_diff: # Slice Creation
slice_services = candidate_resource_value_dict[
"network-slice-services"
......
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