Merge "ovs: removed sinkhole RPC target for old topics"
This commit is contained in:
commit
14d28fb5f3
|
@ -296,7 +296,6 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin,
|
|||
|
||||
# The initialization is complete; we can start receiving messages
|
||||
self.connection.consume_in_threads()
|
||||
self.dead_topics.consume_in_threads()
|
||||
|
||||
self.quitting_rpc_timeout = agent_conf.quitting_rpc_timeout
|
||||
|
||||
|
@ -388,29 +387,6 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin,
|
|||
topics.AGENT,
|
||||
consumers,
|
||||
start_listening=False)
|
||||
self.setup_old_topic_sinkhole()
|
||||
|
||||
def setup_old_topic_sinkhole(self):
|
||||
class SinkHole(object):
|
||||
target = oslo_messaging.Target(version='1.4')
|
||||
|
||||
def __getattr__(self, attr):
|
||||
return self._receiver
|
||||
|
||||
def _receiver(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
# TODO(kevinbenton): remove this once oslo.messaging solves
|
||||
# bug/1705351 so we can stop subscribing to these old topics
|
||||
old_consumers = [[topics.PORT, topics.UPDATE],
|
||||
[topics.PORT, topics.DELETE],
|
||||
[topics.SECURITY_GROUP, topics.UPDATE],
|
||||
[topics.NETWORK, topics.UPDATE]]
|
||||
self._sinkhole = SinkHole()
|
||||
self.dead_topics = agent_rpc.create_consumers(
|
||||
[self._sinkhole], topics.AGENT, old_consumers,
|
||||
start_listening=False
|
||||
)
|
||||
|
||||
def port_update(self, context, **kwargs):
|
||||
port = kwargs.get('port')
|
||||
|
|
Loading…
Reference in New Issue