Merge "Remove code to debug auto address allocation error"
This commit is contained in:
commit
c65e541b6e
|
@ -450,11 +450,6 @@ class IpamPluggableBackend(ipam_backend_mixin.IpamBackendMixin):
|
||||||
|
|
||||||
def add_auto_addrs_on_network_ports(self, context, subnet, ipam_subnet):
|
def add_auto_addrs_on_network_ports(self, context, subnet, ipam_subnet):
|
||||||
"""For an auto-address subnet, add addrs for ports on the net."""
|
"""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
|
# TODO(ataraday): switched for writer when flush_on_subtransaction
|
||||||
# will be available for neutron
|
# will be available for neutron
|
||||||
with context.session.begin(subtransactions=True):
|
with context.session.begin(subtransactions=True):
|
||||||
|
@ -473,10 +468,6 @@ class IpamPluggableBackend(ipam_backend_mixin.IpamBackendMixin):
|
||||||
'eui64_address': True,
|
'eui64_address': True,
|
||||||
'mac': port['mac_address']}
|
'mac': port['mac_address']}
|
||||||
ip_request = factory.get_request(context, port, ip)
|
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:
|
try:
|
||||||
ip_address = ipam_subnet.allocate(ip_request)
|
ip_address = ipam_subnet.allocate(ip_request)
|
||||||
allocated = port_obj.IPAllocation(
|
allocated = port_obj.IPAllocation(
|
||||||
|
|
|
@ -377,9 +377,6 @@ class TestDbBasePluginIpam(test_db_base.NeutronDbPluginV2TestCase):
|
||||||
@mock.patch('neutron.ipam.driver.Pool')
|
@mock.patch('neutron.ipam.driver.Pool')
|
||||||
def test_create_ipv6_pd_subnet_over_ipam(self, pool_mock):
|
def test_create_ipv6_pd_subnet_over_ipam(self, pool_mock):
|
||||||
mocks = self._prepare_mocks_with_pool_mock(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)
|
cfg.CONF.set_override('ipv6_pd_enabled', True)
|
||||||
cidr = n_const.PROVISIONAL_IPV6_PD_PREFIX
|
cidr = n_const.PROVISIONAL_IPV6_PD_PREFIX
|
||||||
allocation_pools = [netaddr.IPRange('::2', '::ffff:ffff:ffff:ffff')]
|
allocation_pools = [netaddr.IPRange('::2', '::ffff:ffff:ffff:ffff')]
|
||||||
|
|
Loading…
Reference in New Issue