kytos-ng / of_core

Kytos Main OpenFlow Network Application (NApp)
MIT License
0 stars 5 forks source link

Provide an event aggregating interfaces creation to facilitate bulk updates or insertions #52

Closed viniarck closed 2 years ago

viniarck commented 2 years ago

Currently, when handling port description, for each interface created it publishes an kytos/of_core.switch.interface.created event, which works great, however it's not bulk-friendly to minimize writes, since this function already takes a list, I think it makes sense to provide an aggregated event publishing all interfaces something like kytos/of_core.switch.interfaces.created below: and the subscribers who need to bulk update listen for this one instead:

kytos/of_core.switch.interfaces.created
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Event reporting that interfaces were created.

It's meant to facilitate bulk updates or inserts.

Content:

.. code-block:: python

   {
    'interfaces': [<interface>] # Instance of Interface class
   }