Merge "Consume FWaaS plugin queue in RPC workers" into stable/liberty
This commit is contained in:
commit
5d56fe212b
|
@ -145,12 +145,7 @@ class FirewallPlugin(
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Do the initialization for the firewall service plugin here."""
|
"""Do the initialization for the firewall service plugin here."""
|
||||||
self.endpoints = [FirewallCallbacks(self)]
|
self.start_rpc_listeners()
|
||||||
|
|
||||||
self.conn = n_rpc.create_connection(new=True)
|
|
||||||
self.conn.create_consumer(
|
|
||||||
topics.FIREWALL_PLUGIN, self.endpoints, fanout=False)
|
|
||||||
self.conn.consume_in_threads()
|
|
||||||
|
|
||||||
self.agent_rpc = FirewallAgentApi(
|
self.agent_rpc = FirewallAgentApi(
|
||||||
topics.L3_AGENT,
|
topics.L3_AGENT,
|
||||||
|
@ -158,6 +153,14 @@ class FirewallPlugin(
|
||||||
)
|
)
|
||||||
firewall_db.subscribe()
|
firewall_db.subscribe()
|
||||||
|
|
||||||
|
def start_rpc_listeners(self):
|
||||||
|
self.endpoints = [FirewallCallbacks(self)]
|
||||||
|
|
||||||
|
self.conn = n_rpc.create_connection(new=True)
|
||||||
|
self.conn.create_consumer(
|
||||||
|
topics.FIREWALL_PLUGIN, self.endpoints, fanout=False)
|
||||||
|
return self.conn.consume_in_threads()
|
||||||
|
|
||||||
def _rpc_update_firewall(self, context, firewall_id):
|
def _rpc_update_firewall(self, context, firewall_id):
|
||||||
status_update = {"firewall": {"status": const.PENDING_UPDATE}}
|
status_update = {"firewall": {"status": const.PENDING_UPDATE}}
|
||||||
super(FirewallPlugin, self).update_firewall(context, firewall_id,
|
super(FirewallPlugin, self).update_firewall(context, firewall_id,
|
||||||
|
|
Loading…
Reference in New Issue