summaryrefslogtreecommitdiffstats
path: root/openecomp-be/tools/install/database/schemaTemplates/composition/nic.ftl
blob: 15d34f248915fdcaf5e29aedf14aecca0843315a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
        "type": "string",
         <#if manual>
            {"pattern":"^[a-zA-Z0-9_]*$"}
         <#else>
            "enum": [
             "${nic.name}"
            ],
           "default": "${nic.name}"
         </#if>
},
    "description": {
      "type": "string"
    }<#if !manual><#if nic.networkId??>,
    "networkId": {
      "type": "string",
      "enum": [
        "${nic.networkId}"
      ],
      "default": "${nic.networkId}"
    }
  </#if>
  <#elseif manual><#if nic.networkId??>,
  "networkId": {
  "type": "string",
  "enum": [
  "${nic.networkId}"
  ],
  "default": "${nic.networkId}"
  }
  </#if>
<#else>,
    "networkId": {
      "type": "string",
      "enum": [<#list networkIds as networkId>
        "${networkId}"<#sep>,</#list>
      ]
    }
  </#if>,
    "networkDescription": {
      "type": "string"
    },
    "networkType": {
      "type": "string",
      "enum": [
        "${nic.networkType}"
      ],
      "default": "${nic.networkType}"
    }
  },

  "additionalProperties": false,
  "required": [
    "name"
  ]
}