]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Raise an exception if no router_id provided
authorHui HX Xiang <xianghui@cn.ibm.com>
Tue, 17 Sep 2013 02:38:56 +0000 (19:38 -0700)
committerHui HX Xiang <xianghui@cn.ibm.com>
Fri, 27 Sep 2013 02:19:52 +0000 (19:19 -0700)
commit96e0eb23a458f068f540d98132ee261053c45585
treecb7b95672b43f83e7a9e0a45d99c9c34dc556e58
parent495bdeb580353d467093fef4fe7f15a15d210726
Raise an exception if no router_id provided

IF both service neutron-l3-agent and neutron-server are up,
but no router id configured in /etc/neutron/l3_agent.ini, an
exception will be raised on DB as "DBError: IntegrityError",
because the variable router_ids has a default '' value that
doesn't match the DB grammar.

    * Check router id is specified in _init_() of l3 when
      not using namespace.
    * Move part of checking config params actions to new function
      _check_config_params()
    * Add corresponding unit tests.

Closes-Bug: #1226366

Change-Id: I905f8a4061c5b250782e025681dfefcc41c8c03c
neutron/agent/l3_agent.py
neutron/tests/unit/test_l3_agent.py