api: Address issues with instance actions API

The user_id and project_id fields can be null. Explain why.

Change-Id: I34353ec7e55845a83f5e2f1dc4b41dead4ac5c81
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane
2025-06-06 11:45:00 +01:00
parent 2ca03367ad
commit f09904f62d
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -5893,6 +5893,7 @@ project_id_server:
project_id_server_action:
description: |
The ID of the project which initiated the server action.
This can be ``null`` for ``nova-manage``-initiated actions.
in: body
required: true
type: string
@@ -7395,6 +7396,7 @@ user_id_migration_2_80:
user_id_server_action:
description: |
The ID of the user which initiated the server action.
This can be ``null`` for ``nova-manage``-initiated actions.
in: body
required: true
type: string
@@ -60,6 +60,9 @@ index_response = {
'action': {'type': 'string'},
'instance_uuid': {'type': 'string', 'format': 'uuid'},
'message': {'type': ['null', 'string']},
# NOTE(stephenfin): While this will always be set for
# API-initiated actions, it will not be set for e.g.
# `nova-manage`-initiated actions
'project_id': {
'type': ['null', 'string'],
'pattern': '^[a-zA-Z0-9-]*$',
@@ -68,6 +71,8 @@ index_response = {
},
'request_id': {'type': 'string'},
'start_time': {'type': 'string', 'format': 'date-time'},
# NOTE(stephenfin): As with project_id, this can be null
# under select circumstances.
'user_id': {
'type': ['null', 'string'],
'pattern': '^[a-zA-Z0-9-]*$',