[openstack-dev] [oslo.messaging] extending notification MessagingDriver

Doug Hellmann doug at doughellmann.com
Thu Feb 26 17:33:59 UTC 2015



On Thu, Feb 26, 2015, at 07:24 AM, Boden Russell wrote:
> What's the suggested approach for implementing a custom oslo messaging
> driver given the existing impl [1] is "private"?
> 
> e.g. I want to provide my own notification messaging driver which adds
> functionality atop the existing driver [1]. This can obviously be done
> by extending the oslo.messaging.notify._impl_messaging.MessagingDriver
> and registering the custom impl as a stevedore plugin. e.g.
> 
> -----------
> from oslo.messaging.notify import _impl_messaging as messaging
> 
> 
> class MyMessagingDriver(messaging.MessagingDriver):
> # impl below
> -----------
> 
> 
> This works, but given the private nature of oslo's "_impl_messaging" I'm
> likely not following best practices.
> 
> Any feedback is appreciated.

Yes, I don't recommend relying on anything in private modules. It looks
like even the base class for the notification drivers is private, right
now. We should probably change that, so I filed
https://bugs.launchpad.net/oslo.messaging/+bug/1426046.

Maybe if you can give more details about what your driver wants to do, I
can provide better feedback about a short-term approach for you.

Doug
> 
> Thanks
> 
> 
> [1] http://goo.gl/cRGNwJ
> 
> 
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe:
> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list