During a port list operation, a port and its parent network
may be concurrently deleted from the database after they have
been retrieved from the DB but before policy is enforced.
Then when the policy engine tries to do a get_network to check
network ownership for a port on a network that no longer exists,
it will encounter a NetworkNotFound exception from the core plugin.
This exception was being propagated all of the way up to the whole
API operation as a 404, which made no sense in the context of a
port list.
This patch adjusts the logic to catch any NotFound exceptions during
this processing and convert them into a RetryRequest to trigger the
API to restart the operation. At this point the objects will be gone
from the database so the problematic items will not be passed to the
policy engine for enforcement.
Closes-Bug: #1528031
Change-Id: I89d12fe0767e1c7ecb68138b5f6f17aa68a68769