Set self and schema to readOnly

The "self" and "schema" setions in metadata-namespace,
image-member, task and metadata-objects'schemas should
be readOnly.

Change-Id: I10e919a2e33505468cbd3e0ae49d736917c64884
This commit is contained in:
wangxiyuan 2016-02-14 10:32:31 +08:00
parent 6a9ae42287
commit fd4158488d
4 changed files with 16 additions and 3 deletions

View File

@ -346,7 +346,10 @@ _MEMBER_SCHEMA = {
'rejected' 'rejected'
] ]
}, },
'schema': {'type': 'string'} 'schema': {
'readOnly': True,
'type': 'string'
}
} }

View File

@ -715,9 +715,11 @@ def _get_base_properties():
"format": "date-time" "format": "date-time"
}, },
"schema": { "schema": {
'readOnly': True,
"type": "string" "type": "string"
}, },
"self": { "self": {
'readOnly': True,
"type": "string" "type": "string"
}, },
"resource_type_associations": { "resource_type_associations": {

View File

@ -184,9 +184,11 @@ def _get_base_properties():
"$ref": "#/definitions/property" "$ref": "#/definitions/property"
}, },
"schema": { "schema": {
'readOnly': True,
"type": "string" "type": "string"
}, },
"self": { "self": {
'readOnly': True,
"type": "string" "type": "string"
}, },
"created_at": { "created_at": {

View File

@ -374,8 +374,14 @@ _TASK_SCHEMA = {
"description": _("Datetime when this resource was updated"), "description": _("Datetime when this resource was updated"),
"type": "string" "type": "string"
}, },
'self': {'type': 'string'}, 'self': {
'schema': {'type': 'string'} 'readOnly': True,
'type': 'string'
},
'schema': {
'readOnly': True,
'type': 'string'
}
} }