X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=code%2Fnetwork-generator%2Fmodel%2Fpython%2Ftop.py;h=82701e5230b961406a0bfe33242e8aae745ff9b6;hb=c8e3bd35883f540afe023fd077ad64cde327e18a;hp=ea6010aec291e4233eee42d2afc8c81f6e80e521;hpb=4e82b9514fd2275cd7d42e633a4418e6ca1d5500;p=oam.git diff --git a/code/network-generator/model/python/top.py b/code/network-generator/model/python/top.py index ea6010a..82701e5 100644 --- a/code/network-generator/model/python/top.py +++ b/code/network-generator/model/python/top.py @@ -18,10 +18,8 @@ An abstract Class for all classes """ import uuid -from abc import ABC, abstractmethod -from typing import Any +from abc import ABC from model.python.type_definitions import ( - AddressType, AdministrativeState, OperationalState, UsageState, @@ -29,7 +27,6 @@ from model.python.type_definitions import ( LifeCycleState, AlarmState, ) -from model.python.geo_location import GeoLocation # Define the ITop interface @@ -57,7 +54,7 @@ class ITop: # Define the Top class class Top(ABC, ITop): - def __init__(self, data: [dict[str, Any] | None] = None): + def __init__(self, data: [dict[str, dict] | None] = None): self._id = data["id"] if data and "id" in data else str(uuid.uuid4()) self._name = ( data["name"] @@ -149,7 +146,7 @@ class Top(ABC, ITop): def utilization(self, value: Utilization): self._utilization = value - def json(self) -> dict[str, Any]: + def json(self) -> dict[str, dict]: return { "id": self.id, "name": self.name,