Follow up to change of exception raised
The patch in the Depends-On line changed the class of an exception raised in neutron-lib. This change adapts neutron code where we expected the exception changed. Change-Id: I34f7d2aab0af0b985d9165465fe9e7c656041745 Depends-On: https://review.opendev.org/695205
This commit is contained in:
parent
3b03b509ee
commit
c5b7817fd0
|
@ -224,7 +224,7 @@ class NovaSegmentNotifier(object):
|
|||
self.p_client.update_resource_provider_inventory(
|
||||
event.segment_id, ipv4_inventory, IPV4_RESOURCE_CLASS)
|
||||
return
|
||||
except placement_exc.PlacementInventoryUpdateConflict:
|
||||
except placement_exc.PlacementResourceProviderGenerationConflict:
|
||||
LOG.debug('Re-trying to update Nova IPv4 inventory for '
|
||||
'routed network segment: %s', event.segment_id)
|
||||
LOG.error('Failed to update Nova IPv4 inventory for routed '
|
||||
|
|
|
@ -2258,9 +2258,9 @@ class TestNovaSegmentNotifier(SegmentAwareIpamTestCase):
|
|||
self.mock_p_client.get_inventory.return_value = inventory
|
||||
self.mock_p_client.update_resource_provider_inventory.\
|
||||
side_effect = (
|
||||
placement_exc.PlacementInventoryUpdateConflict(
|
||||
resource_provider=mock.ANY,
|
||||
resource_class=seg_plugin.IPV4_RESOURCE_CLASS))
|
||||
placement_exc.
|
||||
PlacementResourceProviderGenerationConflict(
|
||||
resource_provider=mock.ANY, generation=1))
|
||||
self.segments_plugin.nova_updater._update_nova_inventory(event)
|
||||
self.assertEqual(seg_plugin.MAX_INVENTORY_UPDATE_RETRIES,
|
||||
self.mock_p_client.get_inventory.call_count)
|
||||
|
|
Loading…
Reference in New Issue