[openstack-dev] [Quantum][Common] Private rpc methods / declare_topic_consumer

Mark McLoughlin markmc at redhat.com
Wed Sep 5 20:12:53 UTC 2012


On Wed, 2012-09-05 at 15:17 -0400, Russell Bryant wrote:
> On 09/05/2012 02:42 PM, Eric Windisch wrote:
> > After a bit of a distraction, I've returned to working on some Quantum compatibility testing, analysis, etc. in regard to ZeroMQ.
> > 
> > Currently, Quantum's NotificationDispatcher class uses connection.declare_topic_consumer which is not part of the standardized RPC abstraction. As such, it has not been implemented in the ZeroMQ driver.
> > 
> > The obvious choices are to make this a required part of the abstraction, implementing it in impl_fake and impl_zmq, or changing the behavior of Quantum.  Also, relatedly, this isn't the first time this has happened in a project, we should really look at prefixing these private functions with _.
> 
> To clarify what *is* a part of the public interface:
> 
> in rpc/__init__.py, create_connection(), the docs say:
> 
>     :returns: An instance of openstack.common.rpc.common.Connection
> 
> so, rpc/common.py has a Connection class which declares the public
> interface.
> 
> Adding prefixes to methods not used outside the class is fine with me.

Yep, at a glance, it looks like declare_topic_consumer() is an
implementation detail of create_consumer() and Quantum should be using
create_consumer(). Good catch.

I've been tracking API improvements we need for the RPC API here:

  https://blueprints.launchpad.net/openstack-common/+spec/rpc-api-review

So, I've gone ahead and filed this:

  https://bugs.launchpad.net/openstack-common/+bug/1046524

Cheers,
Mark.




More information about the OpenStack-dev mailing list