You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The list of links must be accessible by all applications, like the list of switches and interfaces. Although the topology is discovered by the kytos/topology NApp, the results should be stored in the core. The NApp kytos/of_core deals with switch connections, but the data is stored in the core.
The text was updated successfully, but these errors were encountered:
Quick summary of major points to be moved and refactored on both kytos and topology:
Move _get_link_or_create(endpoint_a, endpoint_b) to kytos.core.controller.get_link_or_create(endpoint_a: Interface, endpoint_b: Interface)
Move topologyself.links dict to Controller.links
Move topologyself._links_lock to Controller._links_lock.
Move topologyget_link_from_interface(interface) to kytos.core.controller.get_link_from_interface(interface: Interface) -> Optional[Link]. This method should be thread safe using Controller._links_lock.
Add a new method get_link(link_id: str) -> Optional[Link]
Refactor all topology self.links usage to use kytos.core.controller.links instead, including preserving the shallow copies
Refactor topology self._links_lock to use a shallow copy where it's iterating over links.
Refactor topology on_interruption_start to use another local lock something like with self._interruption_lock each start event needs to be processed sequentially, and on_interruption_end to also use the same lock.
Add a new method on kytos.core.controller.remove_link(link_id: str) -> Optional[Link]
All topology DB writes will still be managed by topology, only the Link instances refs should be moved to core just so certain memory reads becomes easier and avoid IO in many cases that it used to have in certain request calls.
topology endpoints will still stay the same, no compatibility broken except self.links which shouldn't accessed by other NApps, although maintenance is doing it kytos-ng/maintenance#90, so that needs to be refactored too.
Original issue opened by @ajoaoff at kytos#1064.
The list of links must be accessible by all applications, like the list of switches and interfaces. Although the topology is discovered by the
kytos/topology
NApp, the results should be stored in the core. The NAppkytos/of_core
deals with switch connections, but the data is stored in the core.The text was updated successfully, but these errors were encountered: