Skip to content

Commit faa9de9

Browse files
dengzhaosenstephenfin
authored andcommitted
Remove the redundant code for attach interface
The 'pci_request_id' attribute of the 'nova.objects.NetworkRequest' object is already populated by the preceeding call to 'create_resource_requests' [1]. [1] https://opendev.org/openstack/nova/src/tag/22.0.0/nova/network/neutron.py#L2149 Change-Id: I0377d04043130e1acb4f4e8e9b54fbe3ec86e073
1 parent 052cf96 commit faa9de9

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

nova/compute/manager.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7763,12 +7763,6 @@ def _attach_interface(self, context, instance, network_id, port_id,
77637763
context, requested_networks, pci_reqs,
77647764
affinity_policy=pci_numa_affinity_policy)
77657765

7766-
# We only support one port per attach request so we at most have one
7767-
# pci request
7768-
if pci_reqs.requests:
7769-
pci_req = pci_reqs.requests[0]
7770-
requested_networks[0].pci_request_id = pci_req.request_id
7771-
77727766
result = self._allocate_port_resource_for_instance(
77737767
context, instance, pci_reqs, request_groups)
77747768
provider_mappings, resources = result

0 commit comments

Comments
 (0)