Add support for showing scheduler_hints in server details

Nova currently lacks a straightforward way to expose scheduler hints
associated with a server. This change extends existing Nova's
API to allow users to retrieve this information when it is available.
It adds a new API microversion to support returning the associated
scheduler_hints in ``GET /servers/{server_id}``, `GET /servers/detail``,
``PUT /servers/{server_id}`` and ``POST /server/{server_id}/action``
(rebuild) responses.

Implements: blueprint show-scheduler-hints-in-server-details
Change-Id: If0070cfbc218e0515bf3b58fc8c5067ae22c7072
This commit is contained in:
Douglas Viroel
2025-01-07 13:52:05 -03:00
parent d9f72b2432
commit 2db8af71dd
30 changed files with 1176 additions and 18 deletions
+8
View File
@@ -6127,6 +6127,14 @@ running_vms_total:
in: body
required: true
type: integer
scheduler_hints:
description: |
The dictionary of hints sent to the scheduler during server
creation time.
in: body
required: true
type: object
min_version: 2.100
secgroup_default_rule_id:
description: |
The security group default rule ID.
+5
View File
@@ -675,10 +675,15 @@ Response
- os-extended-volumes:volumes_attached.delete_on_termination: os-extended-volumes:volumes_attached.delete_on_termination_update_rebuild
- OS-SRV-USG:launched_at: OS-SRV-USG:launched_at_update_rebuild
- OS-SRV-USG:terminated_at: OS-SRV-USG:terminated_at_update_rebuild
- scheduler_hints: scheduler_hints
- security_groups: security_groups_obj_update_rebuild
- security_group.name: name_update_rebuild
- host_status: host_status_update_rebuild
**Example Rebuild Server (rebuild Action) (v2.100)**
.. literalinclude:: /../../doc/api_samples/servers/v2.100/server-action-rebuild-resp.json
**Example Rebuild Server (rebuild Action) (v2.98)**
.. literalinclude:: ../../doc/api_samples/servers/v2.98/server-action-rebuild-resp.json
+12
View File
@@ -671,6 +671,7 @@ Response
- fault.details: fault_details
- pinned_availability_zone: pinned_availability_zone
- progress: progress
- scheduler_hints: scheduler_hints
- security_groups: security_groups_obj_optional
- security_group.name: name
- servers_links: servers_links
@@ -681,6 +682,11 @@ Response
- trusted_image_certificates: server_trusted_image_certificates_resp
- locked_reason: locked_reason_resp
**Example List Servers Detailed (2.100)**
.. literalinclude:: /../../doc/api_samples/servers/v2.100/servers-details-resp.json
:language: javascript
**Example List Servers Detailed (2.98)**
.. literalinclude:: /../../doc/api_samples/servers/v2.98/servers-details-resp.json
@@ -806,6 +812,7 @@ Response
- fault.details: fault_details
- pinned_availability_zone: pinned_availability_zone
- progress: progress
- scheduler_hints: scheduler_hints
- security_groups: security_groups_obj_optional
- security_group.name: name
- locked: locked
@@ -816,6 +823,11 @@ Response
- server_groups: server_groups_2_71
- locked_reason: locked_reason_resp
**Example Show Server Details (2.100)**
.. literalinclude:: ../../doc/api_samples/servers/v2.100/server-get-resp.json
:language: javascript
**Example Show Server Details (2.98)**
.. literalinclude:: ../../doc/api_samples/servers/v2.98/server-get-resp.json