summaryrefslogtreecommitdiff
path: root/nova/scheduler
diff options
context:
space:
mode:
authorBalazs Gibizer <balazs.gibizer@est.tech>2021-05-28 14:26:05 +0200
committerBalazs Gibizer <balazs.gibizer@est.tech>2021-08-22 11:45:17 +0200
commit94f47471e058e46441a63d5aaf77776ef75b3fba (patch)
tree8b5fdb45c00d58daad12ed166529cac7a6973ebd /nova/scheduler
parentd6cd4420bb33501e267b10ccc3a1f26ab2c8c85b (diff)
downloadnova-94f47471e058e46441a63d5aaf77776ef75b3fba.tar.gz
Transfer RequestLevelParams from ports to scheduling
The new format of the resource_request field of the Neutron port allows expressing not just request groups but also request global parameters for the allocation candidate query. This patch adapts the neutron client in nova to parse such parameters. Then transfer this information to the scheduler to include it in the allocation candidate request. It relies on previous patches that already extended the RequestLevelParams ovo and the allocation candidate query generation. Change-Id: Icb91f6429050a161f577d0ed94d4cd906d3da461 blueprint: qos-minimum-guaranteed-packet-rate
Diffstat (limited to 'nova/scheduler')
-rw-r--r--nova/scheduler/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/scheduler/utils.py b/nova/scheduler/utils.py
index b68a165480..9b6f6514cb 100644
--- a/nova/scheduler/utils.py
+++ b/nova/scheduler/utils.py
@@ -202,9 +202,13 @@ class ResourceRequest(object):
def from_request_group(
cls,
request_group: 'objects.RequestGroup',
+ request_level_params: 'objects.RequestLevelParams',
) -> 'ResourceRequest':
"""Create a new instance of ResourceRequest from a RequestGroup."""
res_req = cls()
+ res_req._root_required = request_level_params.root_required
+ res_req._root_forbidden = request_level_params.root_forbidden
+ res_req._same_subtree = request_level_params.same_subtree
res_req._add_request_group(request_group)
res_req.strip_zeros()
return res_req