Add to_directory method to relevant object classes
[oam.git] / code / network-generator / network_generation / model / python / o_ran_node.py
index e8471ab..8dba3bc 100644 (file)
@@ -178,12 +178,7 @@ class ORanNode(ORanObject):
     def to_topology_nodes(self) -> list[dict[str, Any]]:
         tps: list[dict[str, Any]] = []
         for tp in self.termination_points():
-            if (
-                str(type(tp))
-                == "<class 'model.python.o_ran_termination_point"
-                + ".ORanTerminationPoint'>"
-            ):
-                tps.append(tp.to_topology())
+            tps.append(tp.to_topology())
 
         result: list[dict[str, Any]] = []
         result.append(
@@ -221,3 +216,7 @@ class ORanNode(ORanObject):
     @abstractmethod
     def toSvg(self) -> ET.Element:
         pass
+
+    @abstractmethod
+    def to_directory(self, parent_dir: str) -> None:
+        pass