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

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

index 8dddf5c..850485b 100644 (file)
@@ -22,9 +22,6 @@ import xml.etree.ElementTree as ET
 from typing import Any, cast
 
 from network_generation.model.python.o_ran_node import IORanNode, ORanNode
-from network_generation.model.python.o_ran_termination_point import (
-    ORanTerminationPoint,
-)
 
 
 # Define the "IORanDu" interface
@@ -43,6 +40,10 @@ default_value: IORanDu = cast(
 
 # Define an abstract O-RAN Node class
 class ORanDu(ORanNode):
+
+    _interfaces: list[str] = ["e2", "o1",
+                              "ofhm", "ofhc", "ofhu", "ofhs"]
+
     def __init__(
         self,
         data: dict[str, Any] = cast(dict[str, Any], default_value),
@@ -64,24 +65,6 @@ class ORanDu(ORanNode):
                 result[key] = data[key]  # type: ignore
         return result
 
-    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]),
-                     "supporter": phy_tp,
-                     "parent": self
-            }))
-        return result
-
     def to_topology_nodes(self) -> list[dict[str, Any]]:
         result: list[dict[str, Any]] = super().to_topology_nodes()
         return result