[idf.fuel] Add jumpserver.trunks for mgmt
[pharos.git] / config / pdf / idf-pod1.schema.yaml
1 ##############################################################################
2 # Copyright (c) 2018 Enea AB and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 ---
9 $schema: 'http://json-schema.org/schema#'
10 $id: 'https://github.com/opnfv/pharos/blob/master/config/pdf/pod1.yaml'
11
12 definitions:
13   net_config:
14     v0.1:
15       # NOTE: I hope this is going away soon, so I won't model it yet
16       type: 'object'
17   compass:
18     v0.1:
19       type: 'object'
20       # NOTE: To be properly modeled by Compass4NFV maintainers
21   daisy:
22     v0.1:
23       type: 'object'
24       # NOTE: To be properly modeled by Daisy maintainers
25   fuel:
26     v0.1:
27       type: 'object'
28       properties:
29         jumphost:
30           type: 'object'
31           properties:
32             bridges:
33               type: 'object'
34               properties:
35                 admin:
36                   type: ['string', 'null']
37                 mgmt:
38                   type: ['string', 'null']
39                 private:
40                   type: ['string', 'null']
41                 public:
42                   type: ['string', 'null']
43               required: ['admin', 'mgmt', 'private', 'public']
44               additionalProperties: false
45             trunks:
46               type: 'object'
47               properties:
48                 mgmt:
49                   type: 'boolean'
50               required: ['mgmt']
51               additionalProperties: false
52           required: ['bridges']
53           additionalProperties: false
54         maas:
55           type: 'object'
56           properties:
57             timeout_comissioning:
58               type: 'number'
59             timeout_deploying:
60               type: 'number'
61           required: ['timeout_comissioning', 'timeout_deploying']
62           additionalProperties: false
63         network:
64           type: 'object'
65           properties:
66             ntp_strata_host1:
67               type: 'string'
68             ntp_strata_host2:
69               type: 'string'
70             node:
71               type: 'array'
72               items:
73                 type: 'object'
74                 properties:
75                   interfaces:
76                     type: 'array'
77                     items:
78                       type: ['string', 'null']
79                   busaddr:
80                     type: 'array'
81                     items:
82                       type: ['string', 'null']
83                 required: ['interfaces', 'busaddr']
84                 additionalProperties: false
85           required: ['node']
86           additionalProperties: false
87         reclass:  # Optional
88           type: 'object'
89           properties:
90             node:
91               type: 'array'
92               items:
93                 type: 'object'
94                 properties:
95                   compute_params:
96                     type: 'object'
97                     properties:
98                       common:  # Optional
99                         type: 'object'
100                         properties: &compute_params_common_properties
101                           nova_cpu_pinning:  # Optional
102                             type: 'string'
103                           compute_hugepages_size:
104                             type: 'string'
105                             enum: ['2M', '1G']
106                           compute_hugepages_count:
107                             type: 'number'
108                           compute_hugepages_mount:
109                             type: 'string'
110                           compute_kernel_isolcpu:  # Optional
111                             type: 'string'
112                           compute_ovs_pmd_cpu_mask:  # Optional
113                             type: ['string', 'number']
114                           compute_ovs_memory_channels:  # Optional
115                             type: ['string', 'number']
116                         required: ['compute_hugepages_size', 'compute_hugepages_count',
117                                    'compute_hugepages_mount']
118                         additionalProperties: false
119                       dpdk:  # Optional
120                         type: 'object'
121                         properties:
122                           <<: *compute_params_common_properties
123                           compute_dpdk_driver:
124                             type: 'string'
125                           compute_ovs_dpdk_socket_mem:
126                             type: ['string', 'number']
127                           compute_ovs_dpdk_lcore_mask:
128                             type: ['string', 'number']
129                           dpdk0_driver:
130                             type: 'string'
131                           dpdk0_n_rxq:
132                             type: 'number'
133                         required: ['compute_dpdk_driver', 'dpdk0_driver', 'dpdk0_n_rxq',
134                                    'compute_ovs_dpdk_socket_mem',
135                                    'compute_ovs_dpdk_lcore_mask']
136                         additionalProperties: false
137                     additionalProperties: false
138                 required: ['compute_params']
139                 additionalProperties: false
140           required: ['node']
141           additionalProperties: false
142       required: ['jumphost', 'network']
143       additionalProperties: false
144   osa:
145     v0.1:
146       type: ['object', 'null']
147       # NOTE: To be properly modeled by XCI maintainers
148
149 ##############################################################################
150 # Top-level structure:
151 # - define all possible top-level and second-level keys, without enforcing a
152 #   schema for second-level, just so we can disallow additional properties;
153 # - require 'version' and allow dynamically generated 'version_x.y' key;
154 properties:
155   idf:
156     properties:
157       # version_x.y keys are auto-added by `validate_schema.py` based on 'version'
158       version_0.1:
159         type: 'boolean'
160       version:
161         type: 'number'
162         enum: [0.1]
163       installer:
164         type: 'array'
165         items:
166           type: 'string'
167           enum: ['apex', 'compass4nfv', 'daisy', 'fuel', 'joid', 'osa']
168       net_config:
169         type: 'object'
170       compass:
171         type: 'object'
172       daisy:
173         type: 'object'
174       fuel:
175         type: 'object'
176       osa:
177         type: ['object', 'null']
178     required: ['version']
179     additionalProperties: false
180     ############################################################################
181     # Schema versioning
182     # - based on dynamically added 'version_x.y', require additional IDF blocks
183     #   and validate them against the proper schema version;
184     dependencies:
185       version_0.1:
186         properties:
187           net_config:
188             $ref: '#/definitions/net_config/v0.1'
189           compass:
190             $ref: '#/definitions/compass/v0.1'
191           daisy:
192             $ref: '#/definitions/daisy/v0.1'
193           fuel:
194             $ref: '#/definitions/fuel/v0.1'
195           osa:
196             $ref: '#/definitions/osa/v0.1'
197       fuel:
198         required: ['net_config']
199       daisy:
200         required: ['net_config']
201       osa:
202         required: ['net_config']
203   xci:
204     type: 'object'
205     # NOTE: To be properly modeled by XCI maintainers
206
207 # Do not allow any properties not defined here. This lets us catch typos.
208 additionalProperties: false
209 required: ['idf']