summaryrefslogtreecommitdiff
path: root/nova/compute
diff options
context:
space:
mode:
authorBalazs Gibizer <gibi@redhat.com>2022-10-28 11:42:36 +0200
committerBalazs Gibizer <gibi@redhat.com>2023-01-05 17:40:17 +0100
commitd53a4922a0eea40f5dd5911af751976d83ff915b (patch)
tree78bd413fded94421eb88a9fdbd5c0b6114e4ded0 /nova/compute
parent8911da6923c72290e0d556545f6c2e17aaf2e2d4 (diff)
downloadnova-d53a4922a0eea40f5dd5911af751976d83ff915b.tar.gz
FUP for the scheduler part of PCI in placement
Fixing minor comments from: * https://review.opendev.org/c/openstack/nova/+/852771 * https://review.opendev.org/c/openstack/nova/+/853316 * https://review.opendev.org/c/openstack/nova/+/854120 * https://review.opendev.org/c/openstack/nova/+/854440 * https://review.opendev.org/c/openstack/nova/+/854119 * https://review.opendev.org/c/openstack/nova/+/854121 blueprint: pci-device-tracking-in-placement Change-Id: Id34c13c0052928b43a302f30bf4ce7a87d1ceeec
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/manager.py54
1 files changed, 30 insertions, 24 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 649959be87..9ab3e39fdf 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -2471,10 +2471,12 @@ class ComputeManager(manager.Manager):
if provider_mapping:
try:
- compute_utils\
- .update_pci_request_with_placement_allocations(
- context, self.reportclient,
- instance.pci_requests.requests, provider_mapping)
+ compute_utils.update_pci_request_with_placement_allocations(
+ context,
+ self.reportclient,
+ instance.pci_requests.requests,
+ provider_mapping,
+ )
except (exception.AmbiguousResourceProviderForPCIRequest,
exception.UnexpectedResourceProviderNameForPCIRequest
) as e:
@@ -3788,10 +3790,12 @@ class ComputeManager(manager.Manager):
provider_mapping = self._get_request_group_mapping(request_spec)
if provider_mapping:
- compute_utils.\
- update_pci_request_with_placement_allocations(
- context, self.reportclient,
- instance.pci_requests.requests, provider_mapping)
+ compute_utils.update_pci_request_with_placement_allocations(
+ context,
+ self.reportclient,
+ instance.pci_requests.requests,
+ provider_mapping,
+ )
claim_context = rebuild_claim(
context, instance, scheduled_node, allocations,
@@ -5414,10 +5418,12 @@ class ComputeManager(manager.Manager):
if provider_mapping:
try:
- compute_utils.\
- update_pci_request_with_placement_allocations(
- context, self.reportclient,
- instance.pci_requests.requests, provider_mapping)
+ compute_utils.update_pci_request_with_placement_allocations(
+ context,
+ self.reportclient,
+ instance.pci_requests.requests,
+ provider_mapping,
+ )
except (exception.AmbiguousResourceProviderForPCIRequest,
exception.UnexpectedResourceProviderNameForPCIRequest
) as e:
@@ -6898,12 +6904,12 @@ class ComputeManager(manager.Manager):
try:
if provider_mappings:
- update = (
- compute_utils.
- update_pci_request_with_placement_allocations)
- update(
- context, self.reportclient, instance.pci_requests.requests,
- provider_mappings)
+ compute_utils.update_pci_request_with_placement_allocations(
+ context,
+ self.reportclient,
+ instance.pci_requests.requests,
+ provider_mappings,
+ )
accel_info = []
if accel_uuids:
@@ -7983,12 +7989,12 @@ class ComputeManager(manager.Manager):
instance_uuid=instance.uuid) from e
try:
- update = (
- compute_utils.
- update_pci_request_with_placement_allocations)
- update(
- context, self.reportclient, pci_reqs.requests,
- provider_mappings)
+ compute_utils.update_pci_request_with_placement_allocations(
+ context,
+ self.reportclient,
+ pci_reqs.requests,
+ provider_mappings,
+ )
except (
exception.AmbiguousResourceProviderForPCIRequest,
exception.UnexpectedResourceProviderNameForPCIRequest