]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Tighten exception handler for import_object
authorIhar Hrachyshka <ihrachys@redhat.com>
Mon, 13 Jul 2015 09:49:42 +0000 (11:49 +0200)
committerIhar Hrachyshka <ihrachys@redhat.com>
Tue, 14 Jul 2015 18:30:16 +0000 (20:30 +0200)
commit5d07ec908cd7bee1c332ee3be6aee17e8386b9ea
tree3bf145f21ba7060bdbb1359ee5f25452687c36d6
parent1ef2fc8fa16be04f5b653e47927dfe00b552dba0
Tighten exception handler for import_object

oslo_utils raise ImportError if import fails. We should propagate other
failures to callers. Otherwise we may hide issues.

Also report exact failure from import_object in case L3 agent fails to
import interface_driver.

As part of the job, consolidated code to load interface driver into
common function.

Also, stopped checking for specific log messages in dhcp and l3 agent
unit tests: it's too fragile and actually not something we need a unit
test for.

Not to introduce more work for people who handle py3 porting effort,
added the unit test into the list of those that are executed for py34
job until the whole suite is ready for python3.

Change-Id: I10cdb8414c9fb4ad5cfd3f3b2630811f50ffb0c7
neutron/agent/common/utils.py
neutron/agent/l3/agent.py
neutron/agent/linux/dhcp.py
neutron/tests/unit/agent/common/test_utils.py [new file with mode: 0644]
neutron/tests/unit/agent/dhcp/test_agent.py
neutron/tests/unit/agent/l3/test_agent.py
tox.ini