Merge "Remove code to debug auto address allocation error"

This commit is contained in:
Jenkins 2017-08-14 01:44:29 +00:00 committed by Gerrit Code Review
commit c65e541b6e
2 changed files with 0 additions and 12 deletions

View File

@ -450,11 +450,6 @@ class IpamPluggableBackend(ipam_backend_mixin.IpamBackendMixin):
def add_auto_addrs_on_network_ports(self, context, subnet, ipam_subnet):
"""For an auto-address subnet, add addrs for ports on the net."""
# TODO(kevinbenton): remove after bug/1666493 is resolved
if subnet['id'] != ipam_subnet.subnet_manager.neutron_id:
raise RuntimeError(
"Subnet manager doesn't match subnet. %s != %s"
% (subnet['id'], ipam_subnet.subnet_manager.neutron_id))
# TODO(ataraday): switched for writer when flush_on_subtransaction
# will be available for neutron
with context.session.begin(subtransactions=True):
@ -473,10 +468,6 @@ class IpamPluggableBackend(ipam_backend_mixin.IpamBackendMixin):
'eui64_address': True,
'mac': port['mac_address']}
ip_request = factory.get_request(context, port, ip)
# TODO(kevinbenton): remove after bug/1666493 is resolved
LOG.debug("Requesting with IP request: %s port: %s ip: %s "
"for subnet %s and ipam_subnet %s", ip_request,
port, ip, subnet, ipam_subnet)
try:
ip_address = ipam_subnet.allocate(ip_request)
allocated = port_obj.IPAllocation(

View File

@ -377,9 +377,6 @@ class TestDbBasePluginIpam(test_db_base.NeutronDbPluginV2TestCase):
@mock.patch('neutron.ipam.driver.Pool')
def test_create_ipv6_pd_subnet_over_ipam(self, pool_mock):
mocks = self._prepare_mocks_with_pool_mock(pool_mock)
# TODO(kevinbenton): remove after bug/1666493 is resolved
sub = pool_mock.get_instance.return_value.get_subnet.return_value
sub.subnet_manager.neutron_id = mock.ANY
cfg.CONF.set_override('ipv6_pd_enabled', True)
cidr = n_const.PROVISIONAL_IPV6_PD_PREFIX
allocation_pools = [netaddr.IPRange('::2', '::ffff:ffff:ffff:ffff')]