Fix relocated DB models
Some DB models were relocated and their deprecated import paths were cleaned up[1]. [1] Iadbf44d52ee8e30712807384152a29ce1a8b8f72 Change-Id: I58972e3465ed9e3b7d8cdd24abc463d55ce1b7d5
This commit is contained in:
parent
1189b37bd9
commit
f7a4b32137
@ -29,10 +29,10 @@ from neutron_lib.db import model_base
|
||||
from neutron_lib import exceptions as n_exc
|
||||
|
||||
from neutron.db import common_db_mixin as common_db
|
||||
from neutron.db import l3_attrs_db
|
||||
from neutron.db import l3_db
|
||||
from neutron.db import l3_dvr_db
|
||||
from neutron.db.models import address_scope as address_scope_db
|
||||
from neutron.db.models import l3 as l3_db
|
||||
from neutron.db.models import l3_attrs as l3_attrs_db
|
||||
from neutron.db import models_v2
|
||||
from neutron.extensions import l3 as l3_ext
|
||||
from neutron.plugins.ml2 import models as ml2_models
|
||||
|
@ -21,8 +21,8 @@ import sqlalchemy as sa
|
||||
from sqlalchemy import orm
|
||||
from sqlalchemy.orm import exc
|
||||
|
||||
from neutron.db import agents_db
|
||||
from neutron.db import agentschedulers_db as as_db
|
||||
from neutron.db.models import agent as agent_model
|
||||
|
||||
from neutron_dynamic_routing._i18n import _
|
||||
from neutron_dynamic_routing._i18n import _LW
|
||||
@ -53,7 +53,7 @@ class BgpSpeakerDrAgentBinding(model_base.BASEV2):
|
||||
sa.ForeignKey("bgp_speakers.id",
|
||||
ondelete='CASCADE'),
|
||||
nullable=False)
|
||||
dragent = orm.relation(agents_db.Agent)
|
||||
dragent = orm.relation(agent_model.Agent)
|
||||
agent_id = sa.Column(sa.String(length=36),
|
||||
sa.ForeignKey("agents.id",
|
||||
ondelete='CASCADE'),
|
||||
@ -155,7 +155,7 @@ class BgpDrAgentSchedulerDbMixin(bgp_dras_ext.BgpDrSchedulerPluginBase,
|
||||
query = query.filter(
|
||||
BgpSpeakerDrAgentBinding.bgp_speaker_id in bgp_speaker_ids)
|
||||
if admin_state_up is not None:
|
||||
query = query.filter(agents_db.Agent.admin_state_up ==
|
||||
query = query.filter(agent_model.Agent.admin_state_up ==
|
||||
admin_state_up)
|
||||
|
||||
return [binding.dragent
|
||||
|
@ -19,6 +19,7 @@ from sqlalchemy.orm import exc
|
||||
from sqlalchemy import sql
|
||||
|
||||
from neutron.db import agents_db
|
||||
from neutron.db.models import agent as agent_model
|
||||
from neutron.scheduler import base_resource_filter
|
||||
from neutron.scheduler import base_scheduler
|
||||
|
||||
@ -128,7 +129,7 @@ class BgpDrAgentSchedulerBase(BgpDrAgentFilter):
|
||||
|
||||
LOG.debug('Started auto-scheduling on host %s', host)
|
||||
with context.session.begin(subtransactions=True):
|
||||
query = context.session.query(agents_db.Agent)
|
||||
query = context.session.query(agent_model.Agent)
|
||||
query = query.filter_by(
|
||||
agent_type=bgp_consts.AGENT_TYPE_BGP_ROUTING,
|
||||
host=host,
|
||||
|
Loading…
x
Reference in New Issue
Block a user