summaryrefslogtreecommitdiff
path: root/nova/network
diff options
context:
space:
mode:
authorYongli He <yongli.he@intel.com>2021-06-25 07:24:22 +0000
committerYongli He <yongli.he@intel.com>2021-08-05 15:58:34 +0800
commite19fa1a1997c6d18d440dcdc5a0732b7e2467fa5 (patch)
tree7fd51e2df0677f891bbc5ea1f400179c55820e3a /nova/network
parent120fe8af93dae067ef18bd8e66d8a4e16cbd9770 (diff)
downloadnova-e19fa1a1997c6d18d440dcdc5a0732b7e2467fa5.tar.gz
smartnic support - cleanup arqs
delete arqs: - delete arq while port unbind - create ops failed and arqs did not bind to instance - arq bind to instance but not bind to port Implements: blueprint sriov-smartnic-support Change-Id: Idab0ee38750d018de409699a0dbdff106d9e11fb
Diffstat (limited to 'nova/network')
-rw-r--r--nova/network/neutron.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/nova/network/neutron.py b/nova/network/neutron.py
index a46d35458d..80a8c7080f 100644
--- a/nova/network/neutron.py
+++ b/nova/network/neutron.py
@@ -653,11 +653,19 @@ class API:
).get('network')
networks[net_id] = network
+ # Unbind Port device
+ if port_profile.get('arq_uuid'):
+ """Delete device profile by arq uuid."""
+ cyclient = cyborg.get_client(context)
+ cyclient.delete_arqs_by_uuid([port_profile['arq_uuid']])
+ LOG.debug('Delete ARQs %s for port %s',
+ port_profile['arq_uuid'], port_id)
+
# NOTE: We're doing this to remove the binding information
# for the physical device but don't want to overwrite the other
# information in the binding profile.
for profile_key in ('pci_vendor_info', 'pci_slot',
- constants.ALLOCATION):
+ constants.ALLOCATION, 'arq_uuid'):
if profile_key in port_profile:
del port_profile[profile_key]
port_req_body['port'][constants.BINDING_PROFILE] = port_profile