~ubuntu-branches/ubuntu/vivid/neutron/vivid-updates

« back to all changes in this revision

Viewing changes to neutron/scheduler/l3_agent_scheduler.py

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-03-30 11:17:19 UTC
  • mfrom: (1.1.21)
  • Revision ID: package-import@ubuntu.com-20150330111719-h0gx7233p4jkkgfh
Tags: 1:2015.1~b3-0ubuntu1
* New upstream milestone release:
  - d/control: Align version requirements with upstream.
  - d/control: Add new dependency on oslo-log.
  - d/p/*: Rebase.
  - d/control,d/neutron-plugin-hyperv*: Dropped, decomposed into
    separate project upstream.
  - d/control,d/neutron-plugin-openflow*: Dropped, decomposed into
    separate project upstream.
  - d/neutron-common.install: Add neutron-rootwrap-daemon and 
    neutron-keepalived-state-change binaries.
  - d/rules: Ignore neutron-hyperv-agent when installing; only for Windows.
  - d/neutron-plugin-cisco.install: Drop neutron-cisco-cfg-agent as
    decomposed into separate project upstream.
  - d/neutron-plugin-vmware.install: Drop neutron-check-nsx-config and
    neutron-nsx-manage as decomposed into separate project upstream.
  - d/control: Add dependency on python-neutron-fwaas to neutron-l3-agent.
* d/pydist-overrides: Add overrides for oslo packages.
* d/control: Fixup type in package description (LP: #1263539).
* d/p/fixup-driver-test-execution.patch: Cherry pick fix from upstream VCS
  to support unit test exection in out-of-tree vendor drivers.
* d/neutron-common.postinst: Allow general access to /etc/neutron but limit
  access to root/neutron to /etc/neutron/neutron.conf to support execution
  of unit tests in decomposed vendor drivers.
* d/control: Add dependency on python-neutron-fwaas to neutron-l3-agent
  package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import itertools
18
18
import random
19
19
 
20
 
from oslo.config import cfg
21
 
from oslo.db import exception as db_exc
 
20
from oslo_config import cfg
 
21
from oslo_db import exception as db_exc
 
22
from oslo_log import log as logging
22
23
import six
23
24
from sqlalchemy import sql
24
25
 
28
29
from neutron.db import l3_db
29
30
from neutron.db import l3_hamode_db
30
31
from neutron.i18n import _LE, _LW
31
 
from neutron.openstack.common import log as logging
32
32
 
33
33
 
34
34
LOG = logging.getLogger(__name__)
241
241
            if not snat_bindings and router_gw_exists:
242
242
                # If GW exists for DVR routers and no SNAT binding
243
243
                # call the schedule_snat_router
244
 
                plugin.schedule_snat_router(context, router_id, sync_router)
 
244
                return plugin.schedule_snat_router(
 
245
                    context, router_id, sync_router)
245
246
            if not router_gw_exists and snat_bindings:
246
247
                # If DVR router and no Gateway but SNAT Binding exists then
247
248
                # call the unbind_snat_servicenode to unbind the snat service
248
249
                # from agent
249
250
                plugin.unbind_snat_servicenode(context, router_id)
 
251
                return
250
252
        candidates = candidates or self.get_candidates(
251
253
            plugin, context, sync_router)
252
254
        if not candidates: