Commit 337b910a authored by Javier Velázquez's avatar Javier Velázquez
Browse files

Merge branch 'feat/42-tid-change-scheduler-planner' into 'develop'

Resolve "(TID) Change Scheduler planner"

See merge request !45
parents ed6d7de5 c9f6989d
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -22,3 +22,7 @@ service.db
telemetry_client.db
alert.db
.python-version
.agents/
.coverage
.ruff_cache/
.pytest_cache/
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ build nsc:

# Apply unit test to the component
unit_test nsc:
  timeout: 15m
  timeout: 30m
  variables:
    IMAGE_NAME: 'nsc' # name of the microservice
    IMAGE_TAG: 'test' # tag of the container image (production, development, etc)

pyproject.toml

0 → 100644
+23 −0
Original line number Diff line number Diff line
[tool.ruff]
line-length = 120
target-version = "py312"

[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B", "C4", "SIM"]
ignore = [
    "E501",    # Line too long (managed by formatter and docstrings)
    "BLE001",  # Catching Exception is intentional for HTTP 500 API boundary handlers
    "SIM108",  # Use ternary operator
    "SIM102",  # Nested if statements
    "SIM105",  # Use contextlib.suppress
    "SIM117",  # Multiple with statements
]

[tool.pytest.ini_options]
testpaths = ["src/tests"]
pythonpath = ["."]
addopts = "-v --tb=short"

[tool.pyright]
extraPaths = ["."]

src/api/__init__.py

0 → 100644
+35 −0
Original line number Diff line number Diff line
# Copyright 2022-2026 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This file is an original contribution from Telefonica Innovación Digital S.L.

"""API package for Network Slice Controller."""

from __future__ import annotations

from src.api.handlers.base_handler import BaseSliceHandler
from src.api.handlers.e2e_handler import E2EHandler
from src.api.handlers.ixia_handler import IxiaHandler
from src.api.handlers.restconf_handler import RestconfHandler
from src.api.handlers.tfs_handler import TfsHandler
from src.api.main import Api

__all__ = [
    "Api",
    "BaseSliceHandler",
    "E2EHandler",
    "IxiaHandler",
    "RestconfHandler",
    "TfsHandler",
]
+33 −0
Original line number Diff line number Diff line
# Copyright 2022-2026 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This file is an original contribution from Telefonica Innovación Digital S.L.

"""Handlers subpackage initialization."""

from __future__ import annotations

from src.api.handlers.base_handler import BaseSliceHandler
from src.api.handlers.e2e_handler import E2EHandler
from src.api.handlers.ixia_handler import IxiaHandler
from src.api.handlers.restconf_handler import RestconfHandler
from src.api.handlers.tfs_handler import TfsHandler

__all__ = [
    "BaseSliceHandler",
    "E2EHandler",
    "IxiaHandler",
    "RestconfHandler",
    "TfsHandler",
]
Loading