Merge "postgresql compatibility for get_l3_agent routines"

This commit is contained in:
Zuul 2019-04-12 13:01:27 +00:00 committed by Gerrit Code Review
commit 71efba0db5
1 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ class Agent(base.NeutronDbObject):
rb_model.RouterL3AgentBinding.router_id
).label('count')).outerjoin(
rb_model.RouterL3AgentBinding).group_by(
agent_model.Agent.id,
agent_model.Agent,
rb_model.RouterL3AgentBinding
.l3_agent_id).order_by('count')
res = query.filter(agent_model.Agent.id.in_(agent_ids)).first()
@ -119,7 +119,7 @@ class Agent(base.NeutronDbObject):
rb_model.RouterL3AgentBinding.router_id)
.label('count')).
outerjoin(rb_model.RouterL3AgentBinding).
group_by(agent_model.Agent.id).
group_by(agent_model.Agent).
filter(agent_model.Agent.id.in_(agent_ids)).
order_by('count'))
agents = [cls._load_object(context, record[0]) for record in query]