]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Refactor checks for device existence
authorSergey Belous <sbelous@mirantis.com>
Thu, 15 Jan 2015 15:19:51 +0000 (18:19 +0300)
committerSergey Belous <sbelous@mirantis.com>
Fri, 8 May 2015 11:04:53 +0000 (14:04 +0300)
commit6b4d006344e38dcbbc0048b17ca41af16e13e5a2
tree23844e40572db6e9c98fe2406d6e996110c97b38
parentcf8a76743361bb96d714339efb6b5c514d9eeeb4
Refactor checks for device existence

The code calling driver.plug() shouldn't check for the device existence,
it's a duplicate and it's an expensive call.
Move check for device existence to base LinuxInterfaceDriver.plug()
to remove code duplication. Make plug_new() abstract instead.

Change-Id: Id118a64012ad10b197ba681ce5f1b2742eb135b4
Closes-Bug:1348703
neutron/agent/l3/dvr_fip_ns.py
neutron/agent/l3/ha_router.py
neutron/agent/l3/router_info.py
neutron/agent/linux/interface.py
neutron/tests/unit/agent/l3/test_agent.py
neutron/tests/unit/agent/linux/test_interface.py