diff options
Diffstat (limited to 'neutron/scheduler/l3_agent_scheduler.py')
-rw-r--r-- | neutron/scheduler/l3_agent_scheduler.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/neutron/scheduler/l3_agent_scheduler.py b/neutron/scheduler/l3_agent_scheduler.py index 42ec78d439..03ec007113 100644 --- a/neutron/scheduler/l3_agent_scheduler.py +++ b/neutron/scheduler/l3_agent_scheduler.py @@ -27,6 +27,7 @@ from oslo_config import cfg from oslo_db import exception as db_exc from oslo_log import log as logging +from neutron.common import _constants as n_const from neutron.common import utils from neutron.conf.db import l3_hamode_db from neutron.db.models import l3agent as rb_model @@ -185,7 +186,7 @@ class L3Scheduler(object, metaclass=abc.ABCMeta): return if not is_ha: - binding_index = rb_model.LOWEST_BINDING_INDEX + binding_index = n_const.LOWEST_AGENT_BINDING_INDEX if rb_obj.RouterL3AgentBinding.objects_exist( context, router_id=router_id, binding_index=binding_index): LOG.debug('Non-HA router %s has already been scheduled', @@ -194,7 +195,7 @@ class L3Scheduler(object, metaclass=abc.ABCMeta): else: binding_index = plugin.get_vacant_binding_index( context, router_id, is_manual_scheduling) - if binding_index < rb_model.LOWEST_BINDING_INDEX: + if binding_index < n_const.LOWEST_AGENT_BINDING_INDEX: LOG.debug('Unable to find a vacant binding_index for ' 'router %(router_id)s and agent %(agent_id)s', {'router_id': router_id, |