Remove deprecation warning for l3_agent_scheduler

Change Idef2fe3e16b245da849e2d29c5578e5f5d081dc4 relocated the
RouterL3AgentBinding model, but the last rebase didn't change all the
references of this model - there was one left.

Change-Id: Id48d48413ecc2f55fc889b8d19a6760c16434d96
Partial-Bug: #1597913
This commit is contained in:
John Schwarz 2016-10-02 09:45:37 +03:00
parent 0c76de8d01
commit f327aa6750
2 changed files with 3 additions and 4 deletions

View File

@ -15,7 +15,7 @@ import sqlalchemy as sa
from sqlalchemy import orm
from neutron.api.v2 import attributes
from neutron.db import l3_agentschedulers_db as l3_agt
from neutron.db.models import l3agent as rb_model
from neutron.db import models_v2
from neutron.db import standard_attr
from neutron.extensions import l3
@ -61,7 +61,7 @@ class Router(standard_attr.HasStandardAttributes, model_base.BASEV2,
lazy='dynamic')
l3_agents = orm.relationship(
'Agent', lazy='joined', viewonly=True,
secondary=l3_agt.RouterL3AgentBinding.__table__)
secondary=rb_model.RouterL3AgentBinding.__table__)
api_collections = [l3.ROUTERS]

View File

@ -30,7 +30,6 @@ from neutron._i18n import _LE, _LW
from neutron.common import constants
from neutron.common import utils
from neutron.db import api as db_api
from neutron.db import l3_agentschedulers_db
from neutron.db import l3_hamode_db
from neutron.db.models import l3 as l3_models
from neutron.db.models import l3agent as rb_model
@ -87,7 +86,7 @@ class L3Scheduler(object):
# TODO(gongysh) consider the disabled agent's router
no_agent_binding = ~sql.exists().where(
l3_models.Router.id ==
l3_agentschedulers_db.RouterL3AgentBinding.router_id)
rb_model.RouterL3AgentBinding.router_id)
query = context.session.query(
l3_models.Router.id).filter(no_agent_binding)
query = query.filter(l3_models.Router.status ==