removed IdGen class, added simple function to find next valid node id
This commit is contained in:
parent
199c4618f5
commit
6ddf1ac9a4
2 changed files with 14 additions and 16 deletions
|
@ -10,15 +10,6 @@ from core.nodes.interface import CoreInterface
|
|||
from core.nodes.physical import PhysicalNode
|
||||
|
||||
|
||||
class IdGen:
|
||||
def __init__(self, _id: int = 0) -> None:
|
||||
self.id = _id
|
||||
|
||||
def next(self) -> int:
|
||||
self.id += 1
|
||||
return self.id
|
||||
|
||||
|
||||
def link_config(
|
||||
node: Union[CoreNetworkBase, PhysicalNode],
|
||||
interface: CoreInterface,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue