Topo: Add supported-tps to logical TPs 77/13477/1
authorMartin Skorupski <martin.skorupski@highstreet-technologies.com>
Sat, 28 Sep 2024 14:24:59 +0000 (16:24 +0200)
committerMartin Skorupski <martin.skorupski@highstreet-technologies.com>
Sat, 28 Sep 2024 14:24:59 +0000 (16:24 +0200)
- remove termination point specifics

Issue-ID: OAM-417
Change-Id: Id33d2f819c33757fefd6e45df5dbe835fee9f914
Signed-off-by: Martin Skorupski <martin.skorupski@highstreet-technologies.com>
code/network-generator/network_generation/model/python/tower.py

index 2c20100..efcc1e2 100644 (file)
@@ -24,9 +24,6 @@ from typing import Any, cast
 
 from network_generation.model.python.o_ran_node import IORanNode, ORanNode
 from network_generation.model.python.o_ran_ru import ORanRu
-from network_generation.model.python.o_ran_termination_point import (
-    ORanTerminationPoint,
-)
 
 
 # Define the "IoRanDu" interface
@@ -47,6 +44,9 @@ default_value: ITower = cast(
 
 # Implement a concrete O-RAN Node class
 class Tower(ORanNode):
+
+    _interfaces = ["o2"]
+
     def __init__(
         self,
         data: dict[str, Any] = cast(dict[str, Any], default_value),
@@ -109,30 +109,6 @@ class Tower(ORanNode):
     def o_ran_rus(self) -> list[ORanRu]:
         return self._o_ran_rus
 
-    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 ["e2", "o1", "ofhm", "ofhc", "ofhu", "ofhs"]:
-            id: str = "-".join([self.name, interface.upper()])
-            result.append(ORanTerminationPoint({
-                        "name": id,
-                        "type": ":".join(["o-ran-sc-network", interface]),
-                        "supporting-termination-point": [
-                            {
-                                "network-ref": type(
-                                    self.parent.parent.parent.parent
-                                ),
-                                "node-ref": self.name,
-                                "tp-ref": phy_tp,
-                            }
-                        ],
-                    }))
-        return result
-
     def toKml(self) -> ET.Element:
         tower: ET.Element = ET.Element("Folder")
         open: ET.Element = ET.SubElement(tower, "open")