Improve the validation of 'nets' parameter

This PS will improve the validation for the
'nets' parameter.

Change-Id: I3007c412d06ebe9f3494dc07eef4f962ead4d151
Closes-Bug: #1748811
Depends-On: Iebb3ddb53e5e9d31175e6e7eeb170a66a8630a17
This commit is contained in:
deepak_mourya 2018-02-28 12:51:43 +05:30
parent 0a06d7b98c
commit fa1eed9a79

View File

@ -110,7 +110,31 @@ hints = {
}
nets = {
'type': ['array', 'null']
'type': ['array', 'null'],
'items': {
'type': 'object',
'properties': {
'network': {
'type': ['string'],
'minLength': 1,
'maxLength': 255,
},
'v4-fixed-ip': {
'type': ['string'],
'format': 'ipv4'
},
'v6-fixed-ip': {
'type': ['string'],
'format': 'ipv6'
},
'port': {
'type': ['string'],
'maxLength': 255,
'minLength': 1,
}
},
'additionalProperties': False
}
}
availability_zone = {