]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
DHCP agent: clarify logic of setup_dhcp_port
authorNeil Jerram <Neil.Jerram@metaswitch.com>
Thu, 23 Jul 2015 17:17:12 +0000 (18:17 +0100)
committerNeil Jerram <Neil.Jerram@metaswitch.com>
Fri, 21 Aug 2015 11:54:33 +0000 (12:54 +0100)
commit43d62c62a8525a1f2aa67b0ee201c09409fefa9a
treeafaffa1a37801951ad07d55c626b5de5d2ff7e9c
parentf5344dec5b80e38db8ffea10c944ef59b26ebe48
DHCP agent: clarify logic of setup_dhcp_port

When the DHCP port already exists, the code for finding it is
unhelpfully mixed up with the code for updating its subnet IDs and
fixed IP addresses.  Clarify that area by splitting setup_dhcp_port
into 3 subroutines, for each of the existing, reserved and new port
cases.

Related-Bug: #1486649
Change-Id: I2a537560dc7a37299f4b7b4cd508d9309bbe1209
neutron/agent/linux/dhcp.py
neutron/tests/unit/agent/linux/test_dhcp.py