Merge "api: project/tenant and user IDs are not UUIDs"
This commit is contained in:
@@ -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': [
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user