Network fields schema validation

Signed-off-by: Dimitar Bonev <dimitar.bonev@gmail.com>
This commit is contained in:
Dimitar Bonev 2016-01-22 01:18:15 +02:00 • committed by Aanand Prasad
commit 5545c55ecc
3 changed files with 70 additions and 2 deletions

View file

@ -41,7 +41,34 @@
"definitions": {
"network": {
"id": "#/definitions/network",
"type": "object"
"type": "object",
"properties": {
"driver": {"type": "string"},
"driver_opts": {
"type": "object",
"patternProperties": {
"^.+$": {"type": ["string", "number"]}
}
},
"ipam": {
"type": "object",
"properties": {
"driver": {"type": "string"},
"config": {
"type": "array"
}
},
"additionalProperties": false
},
"external": {
"type": ["boolean", "object"],
"properties": {
"name": {"type": "string"}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"volume": {
"id": "#/definitions/volume",