atlanticwave-sdx / sdx-controller

Central Controller for AtlanticWave SDX.
https://www.atlanticwave-sdx.net
MIT License
1 stars 3 forks source link

SDX-Controller should load the topology from DB when starting up #308

Open italovalcy opened 1 month ago

italovalcy commented 1 month ago

Currently the SDX-Controller initialize the TEManager with null topology:

https://github.com/atlanticwave-sdx/sdx-controller/blob/24a592dc38bf59347cd39132e179f5687dbe6426/sdx_controller/__init__.py#L67

I believe there is room for improvement here because otherwise you would have to wait until all OXPs send their topology again to update TEManager.

On the other hand, if you try to get the topology right after restating the controller, that works fine because the get topology endpoint reads directly from DB:

https://github.com/atlanticwave-sdx/sdx-controller/blob/24a592dc38bf59347cd39132e179f5687dbe6426/sdx_controller/controllers/topology_controller.py#L19