Commit eefc016a authored by Shayan Hajipour's avatar Shayan Hajipour
Browse files

debug: match criteria extraction in slice creation fixed

parent d7c5d0d0
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -171,7 +171,6 @@ class L3NMNCEServiceHandler(_ServiceHandler):
        endpoints: List[Tuple[str, str, Optional[str]]],
        connection_uuid: Optional[str] = None,
    ) -> List[Union[bool, Exception]]:
        LOGGER.debug(f"P3: {len(endpoints)} {endpoints}")
        chk_type("endpoints", endpoints, list)
        if len(endpoints) == 0:
            return []
@@ -207,7 +206,6 @@ class L3NMNCEServiceHandler(_ServiceHandler):
            service_name = running_resource_value_dict["network-slice-services"][
                "slice-service"
            ][0]["id"]
            LOGGER.debug(f"P1: {service_name}")
            if not running_candidate_diff:  # Slice Creation
                operation_type = "create"
                slice_services = candidate_resource_value_dict[
@@ -328,7 +326,9 @@ class L3NMNCEServiceHandler(_ServiceHandler):
                    raise Exception(
                        "connection group missmatch in destination sdp and added connection group"
                    )
                match_criteria = removed_sdp["service-match-criteria"]["match-criterion"]
                match_criteria = removed_sdp["service-match-criteria"][
                    "match-criterion"
                ]
                match_criterion = match_criteria[0]
            for type_value in match_criterion["match-type"]:
                if type_value["type"] == "ietf-network-slice-service:source-ip-prefix":
@@ -414,7 +414,7 @@ class L3NMNCEServiceHandler(_ServiceHandler):
            self.__task_executor.configure_device(controller)
            LOGGER.debug('Configured device "{:s}"'.format(controller.name))
        except Exception as e:  # pylint: disable=broad-except
            LOGGER.exception(f'P4: {e}')
            LOGGER.exception(f"P4: {e}")
            raise e
            results.append(e)
        return results