From 7213d9a6a15c6e1514d5e4a7841c98653eeb2e49 Mon Sep 17 00:00:00 2001 From: Martin Skorupski Date: Sat, 28 Sep 2024 14:42:05 +0200 Subject: [PATCH] Topo: Add supported-tps to logical TPs - remove termination point specifics Issue-ID: OAM-417 Change-Id: Ib857e54eb68067d8eb2f1d5166e7bb8a564600e9 Signed-off-by: Martin Skorupski --- .../network_generation/model/python/o_ran_ru.py | 25 +++------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/code/network-generator/network_generation/model/python/o_ran_ru.py b/code/network-generator/network_generation/model/python/o_ran_ru.py index 34f77a3..b077f47 100644 --- a/code/network-generator/network_generation/model/python/o_ran_ru.py +++ b/code/network-generator/network_generation/model/python/o_ran_ru.py @@ -24,9 +24,6 @@ from typing import Any, cast from network_generation.model.python.nr_cell_du import NrCellDu from network_generation.model.python.o_ran_du import ORanDu from network_generation.model.python.o_ran_node import IORanNode, ORanNode -from network_generation.model.python.o_ran_termination_point import ( - ORanTerminationPoint, -) # Define the "IORanRu" interface @@ -47,6 +44,9 @@ default_value: IORanRu = cast( # Define an abstract O-RAN Node class class ORanRu(ORanNode): + + _interfaces = ["ofhc", "ofhu", "ofhs", "ofhm"] + def __init__( self, data: dict[str, Any] = cast(dict[str, Any], default_value), @@ -132,25 +132,6 @@ class ORanRu(ORanNode): def oRanDu(self) -> ORanDu: return self._oRanDu - def termination_points(self) -> list[ORanTerminationPoint]: - result: list[ORanTerminationPoint] = super().termination_points() - phy_tp: str = "-".join([self.name, "phy".upper()]) - result.append(ORanTerminationPoint({ - "name": phy_tp, - "type": "o-ran-sc-network:phy" - })) - for interface in ["ofhm", "ofhc", "ofhu", "ofhs"]: - id: str = "-".join([self.name, interface.upper()]) - result.append(ORanTerminationPoint({ - "name": id, - "type": ":".join(["o-ran-sc-network", interface]), - "supporter": phy_tp, - "parent": self - })) - for cell in self.cells: - result.extend(cell.termination_points()) - return result - def to_topology_nodes(self) -> list[dict[str, Any]]: result: list[dict[str, Any]] = super().to_topology_nodes() result.extend(self.oRanDu.to_topology_nodes()) -- 2.16.6