Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 1 | { |
| 2 | "$schema": "http://json-schema.org/draft-04/schema#", |
| 3 | "type": "object", |
| 4 | "properties": { |
| 5 | "name": { |
shrikantawachar | e9966c9 | 2018-05-15 15:32:18 +0530 | [diff] [blame^] | 6 | "type": "string", |
| 7 | <#if manual> |
| 8 | {"pattern":"^[a-zA-Z0-9_]*$"} |
| 9 | <#else> |
| 10 | "enum": [ |
| 11 | "${nic.name}" |
| 12 | ], |
| 13 | "default": "${nic.name}" |
| 14 | </#if> |
| 15 | }, |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 16 | "description": { |
| 17 | "type": "string" |
| 18 | }<#if !manual><#if nic.networkId??>, |
| 19 | "networkId": { |
| 20 | "type": "string", |
| 21 | "enum": [ |
| 22 | "${nic.networkId}" |
| 23 | ], |
| 24 | "default": "${nic.networkId}" |
| 25 | } |
Avi Ziv | b8e2faf | 2017-07-18 19:45:38 +0300 | [diff] [blame] | 26 | </#if> |
| 27 | <#elseif manual><#if nic.networkId??>, |
| 28 | "networkId": { |
| 29 | "type": "string", |
| 30 | "enum": [ |
| 31 | "${nic.networkId}" |
| 32 | ], |
| 33 | "default": "${nic.networkId}" |
| 34 | } |
| 35 | </#if> |
| 36 | <#else>, |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 37 | "networkId": { |
| 38 | "type": "string", |
| 39 | "enum": [<#list networkIds as networkId> |
| 40 | "${networkId}"<#sep>,</#list> |
| 41 | ] |
| 42 | } |
Avi Ziv | b8e2faf | 2017-07-18 19:45:38 +0300 | [diff] [blame] | 43 | </#if>, |
| 44 | "networkDescription": { |
| 45 | "type": "string" |
| 46 | }, |
| 47 | "networkType": { |
| 48 | "type": "string", |
| 49 | "enum": [ |
| 50 | "${nic.networkType}" |
| 51 | ], |
| 52 | "default": "${nic.networkType}" |
| 53 | } |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 54 | }, |
Avi Ziv | b8e2faf | 2017-07-18 19:45:38 +0300 | [diff] [blame] | 55 | |
Michael Lando | f5f13c4 | 2017-02-19 12:35:04 +0200 | [diff] [blame] | 56 | "additionalProperties": false, |
| 57 | "required": [ |
| 58 | "name" |
| 59 | ] |
| 60 | } |