Closed Carthaca closed 2 months ago
can you please not change the definition of function and instead handle share_network_not found exception ?
upstream code as below
share_net = None
share_net_subnet = None
if subnet_id:
try:
share_net_subnet = self.db.share_network_subnet_get(
context, subnet_id)
share_net = self.db.share_network_get(
context, share_net_subnet['share_network_id'])
except Exception:
LOG.warning('Share network subnet not found during '
'deletion of share server.')
self.driver.deallocate_network(context, share_server['id'],
share_net,
share_net_subnet)
But upstream also isn't using the share_network variable. What is the use case for sending this share network data around if it is not used later?
Loading share_net_subnet
makes sense, yes.
But upstream also isn't using the share_network variable. What is the use case for sending this share network data around if it is not used later?
Loading
share_net_subnet
makes sense, yes.
share network was added to align with definition of allocate_network. Yes, its not used though.
Keeping it close to upstream makes it easier in the future
followup to 72f01f143f7f532ab51ca7c3ec6fb0f4368746e6
share network is not used, it may even be already deleted
Change-Id: I84cc70064a33d790db519acdabcff29e74770f98