Skip to content

Refacto device listeners to manage notificiations

Gilles Thouenon requested to merge dev_notifs_port_update_for_device_71 into master
  • replace the global DeviceChangeListener class by dedicated listeners for interface, odu-connection and roadm-connection allowing better adaptation of business code
  • create dedicated listeners detecting state change on circuit-pack and ports
  • manage race condition when updating circuit-pack. Actually, since a port is contained on a circuit-pack, updating both a port and a circuit-pack simultaneously could be a race condition where one modification could be overwriten by the other one. Synchronized such blocs
  • create DeviceUtil class with generic method to read/write/delete containers into/from device datastores
  • implements in DeviceUtil class specific method to fix operational state according to administrative state
  • refacto the notification sending by replacing the DeviceNotificationProducer which was based on interface modifications inside org-openroadm-device datastore by a DeviceNotificationProvider which manages dependency injection
  • implements the ManagedNotificationProducer interface inside the DevicePortChangeListener class to send notification only when state of a port changes
  • refacto dependency injections by removing all manual instantiations to let guice manage directly dependency injection

Signed-off-by: Gilles Thouenon gilles.thouenon@orange.com

Merge request reports