diff options
author | Mark McLoughlin <markmc@redhat.com> | 2013-06-06 07:50:29 +0100 |
---|---|---|
committer | Mark McLoughlin <markmc@redhat.com> | 2013-06-17 21:47:11 +0100 |
commit | 688832fd379776bf12f21f76c884caa42a48d2c5 (patch) | |
tree | f937b34457892fa937252d34dec34db76c7be03f | |
parent | 49552a75bbe14c4fbce1de40efe985fe5832816e (diff) | |
download | oslo-688832fd379776bf12f21f76c884caa42a48d2c5.tar.gz oslo-688832fd379776bf12f21f76c884caa42a48d2c5.tar.xz oslo-688832fd379776bf12f21f76c884caa42a48d2c5.zip |
Remove unused zmq relay functionality
Fixes bug #1188029
This relay functionality appears to be completely unused and untested
so just remove it. If we need it in future, we can restore it from the
git history.
Change-Id: I479d654aefdbd58c80946818b9a405eaa02644db
-rw-r--r-- | openstack/common/rpc/impl_zmq.py | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/openstack/common/rpc/impl_zmq.py b/openstack/common/rpc/impl_zmq.py index 0b10997..fb8fcd2 100644 --- a/openstack/common/rpc/impl_zmq.py +++ b/openstack/common/rpc/impl_zmq.py @@ -358,7 +358,6 @@ class ZmqBaseReactor(ConsumerBase): def __init__(self, conf): super(ZmqBaseReactor, self).__init__() - self.mapping = {} self.proxies = {} self.threads = [] self.sockets = [] @@ -366,9 +365,8 @@ class ZmqBaseReactor(ConsumerBase): self.pool = eventlet.greenpool.GreenPool(conf.rpc_thread_pool_size) - def register(self, proxy, in_addr, zmq_type_in, out_addr=None, - zmq_type_out=None, in_bind=True, out_bind=True, - subscribe=None): + def register(self, proxy, in_addr, zmq_type_in, + in_bind=True, subscribe=None): LOG.info(_("Registering reactor")) @@ -384,21 +382,6 @@ class ZmqBaseReactor(ConsumerBase): LOG.info(_("In reactor registered")) - if not out_addr: - return - - if zmq_type_out not in (zmq.PUSH, zmq.PUB): - raise RPCException("Bad output socktype") - - # Items push out. - outq = ZmqSocket(out_addr, zmq_type_out, bind=out_bind) - - self.mapping[inq] = outq - self.mapping[outq] = inq - self.sockets.append(outq) - - LOG.info(_("Out reactor registered")) - def consume_in_thread(self): def _consume(sock): LOG.info(_("Consuming socket")) @@ -516,8 +499,7 @@ class ZmqProxy(ZmqBaseReactor): try: self.register(consumption_proxy, consume_in, - zmq.PULL, - out_bind=True) + zmq.PULL) except zmq.ZMQError: if os.access(ipc_dir, os.X_OK): with excutils.save_and_reraise_exception(): @@ -559,11 +541,6 @@ class ZmqReactor(ZmqBaseReactor): #TODO(ewindisch): use zero-copy (i.e. references, not copying) data = sock.recv() LOG.debug(_("CONSUMER RECEIVED DATA: %s"), data) - if sock in self.mapping: - LOG.debug(_("ROUTER RELAY-OUT %(data)s") % { - 'data': data}) - self.mapping[sock].send(data) - return proxy = self.proxies[sock] |