Extend server schema for extended volume attribute

extended volume attribute adds the 'id' in
'os-extended-volumes:volumes_attached' but JSON schema only check
the type array.

We should check 'id' with additional property false. Because v2.3
version adds another attribute in this response which can be strongly
verified on previous versions.

Change-Id: Icf6148017cdbc4f48d3ef9a964ee39fedda72b4e
This commit is contained in:
ghanshyam 2016-07-05 19:34:32 +09:00
parent 7030633ab1
commit da566b99a2
1 changed files with 10 additions and 1 deletions

View File

@ -174,7 +174,16 @@ server_detail['properties'].update({
'OS-EXT-SRV-ATTR:host': {'type': ['string', 'null']},
'OS-EXT-SRV-ATTR:instance_name': {'type': 'string'},
'OS-EXT-SRV-ATTR:hypervisor_hostname': {'type': ['string', 'null']},
'os-extended-volumes:volumes_attached': {'type': 'array'},
'os-extended-volumes:volumes_attached': {
'type': 'array',
'items': {
'type': 'object',
'properties': {
'id': {'type': 'string'}
},
'additionalProperties': False,
},
},
'config_drive': {'type': 'string'}
})
server_detail['properties']['addresses']['patternProperties'][