api: project/tenant and user IDs are not UUIDs

Who knew?

Change-Id: Id3366ce2897cfcb1678034c3d24d809d8c24c43a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane
2025-01-29 11:37:41 +00:00
parent 401ca73c26
commit 8f6b14bada
3 changed files with 12 additions and 3 deletions
@@ -14,6 +14,9 @@
import copy
from nova.api.validation import parameter_types
add_tenant_access = {
'type': 'object',
'properties': {
@@ -68,7 +71,7 @@ _common_response = {
'type': 'object',
'properties': {
'flavor_id': {'type': 'string'},
'tenant_id': {'type': 'string', 'format': 'uuid'},
'tenant_id': parameter_types.project_id,
},
'required': ['flavor_id', 'tenant_id'],
'additionalProperties': True,
@@ -952,9 +952,9 @@ rebuild_response = {
'name': {'type': ['string', 'null']},
'progress': {'type': ['null', 'number']},
'status': {'type': 'string'},
'tenant_id': {'type': 'string', 'format': 'uuid'},
'tenant_id': parameter_types.project_id,
'updated': {'type': 'string', 'format': 'date-time'},
'user_id': {'type': 'string'},
'user_id': parameter_types.user_id,
'OS-DCF:diskConfig': {'type': 'string'},
},
'required': [
+6
View File
@@ -347,6 +347,12 @@ project_id = {
'pattern': '^[a-zA-Z0-9-]*$'
}
user_id = {
'type': 'string',
'pattern': '^[a-zA-Z0-9-]*$',
'minLength': 1,
'maxLength': 255,
}
server_id = {
'type': 'string', 'format': 'uuid'