simplify list_routers_on_l3_agent
Change-Id: I3574b977604faedc33699a4154d20e18ad11b963
This commit is contained in:
parent
8715eafa11
commit
6dc4874125
@ -16,7 +16,6 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
from neutron.db import l3_agentschedulers_db
|
||||
from neutron.plugins.openvswitch import ovs_neutron_plugin
|
||||
|
||||
from akanda.neutron.plugins import decorators as akanda
|
||||
@ -49,16 +48,9 @@ class OVSNeutronPluginV2(ovs_neutron_plugin.OVSNeutronPluginV2):
|
||||
context, id, subnet)
|
||||
|
||||
def list_routers_on_l3_agent(self, context, agent_id):
|
||||
# Override L3AgentSchedulerDbMixin method
|
||||
query = context.session.query(
|
||||
l3_agentschedulers_db.RouterL3AgentBinding.router_id
|
||||
)
|
||||
router_ids = [item[0] for item in query]
|
||||
if router_ids:
|
||||
return {'routers':
|
||||
self.get_routers(context, filters={'id': router_ids})}
|
||||
else:
|
||||
return {'routers': []}
|
||||
return {
|
||||
'routers': self.get_routers(context),
|
||||
}
|
||||
|
||||
def list_active_sync_routers_on_active_l3_agent(
|
||||
self, context, host, router_ids):
|
||||
|
Loading…
x
Reference in New Issue
Block a user