X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=code%2Fnetwork-generator%2Fmodel%2Fpython%2Fo_ran_object.py;h=792cc30e7b8d6885bf0f0d73ecf9f0c88b8a2c7c;hb=527f95ae29a40bfc8535d8b2177d9ca976c48b81;hp=82c74732d15e5fd598f9da07010c2fda78dc6c14;hpb=b6948c6bf9a550ef22fcb6607587e39a3879b74f;p=oam.git diff --git a/code/network-generator/model/python/o_ran_object.py b/code/network-generator/model/python/o_ran_object.py index 82c7473..792cc30 100644 --- a/code/network-generator/model/python/o_ran_object.py +++ b/code/network-generator/model/python/o_ran_object.py @@ -18,10 +18,8 @@ An abstract Class for O-RAN Objects """ from abc import abstractmethod -from typing import Dict - +from typing import Any from model.python.top import ITop, Top -from model.python.geo_location import GeoLocation # Define the "IORanObject" interface @@ -33,23 +31,15 @@ class IORanObject(ITop): # Define an abstract O-RAN Object class class ORanObject(Top, IORanObject): def __init__(self, of: IORanObject = None, **kwargs): - super().__init__(**kwargs) + super().__init__(of, **kwargs) - def json(self): - result: Dict = super().json() + def json(self) -> dict[str, Any]: + result: dict[str, Any] = super().json() return result - def __str__(self): + def __str__(self) -> str: return str(self.json()) @abstractmethod - def toTopology(self): - pass - - @abstractmethod - def toKml(self): - pass - - @abstractmethod - def toSvg(self): + def toTopology(self) -> dict[str, Any]: pass