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

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

index 877019e..65e5cf6 100644 (file)
@@ -33,9 +33,6 @@ from network_generation.model.python.o_ran_node import (
     ORanNode,
     default_value,
 )
-from network_generation.model.python.o_ran_termination_point import (
-    ORanTerminationPoint,
-)
 from network_generation.model.python.tower import Tower
 
 # Define the "IORanDu" interface
@@ -44,6 +41,9 @@ IORanCloudDu = IORanNode
 
 # Implements a concrete O-RAN Node class
 class ORanCloudDu(ORanNode):
+
+    _interfaces = ["o2"]
+
     def __init__(
         self,
         data: dict[str, Any] = cast(dict[str, Any], default_value),
@@ -102,23 +102,6 @@ class ORanCloudDu(ORanNode):
     def towers(self) -> list[Tower]:
         return self._towers
 
-    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 ["o2"]:
-            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 toKml(self) -> ET.Element:
         o_ran_cloud_du: ET.Element = ET.Element("Folder")
         open: ET.Element = ET.SubElement(o_ran_cloud_du, "open")
index 257e6aa..79827bb 100644 (file)
@@ -158,8 +158,8 @@ class NetworkViewer:
         else:
             kml_file = open(f"{filename}.kml", "wb")
             # TODO make lint issue
-            # network_generation/view/network_viewer.py:160: error: 
-            # Argument 1 to "write" of "BufcqferedWriter" has incompatible 
+            # network_generation/view/network_viewer.py:160: error:
+            # Argument 1 to "write" of "BufcqferedWriter" has incompatible
             # type "str"; expected "Buffer"
             kml_file.write(kml)
             kml_file.close()