Merge "add ericsson vpod PDF"
[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           required: ['bridges']
46           additionalProperties: false
47         maas:
48           type: 'object'
49           properties:
50             timeout_comissioning:
51               type: 'number'
52             timeout_deploying:
53               type: 'number'
54           required: ['timeout_comissioning', 'timeout_deploying']
55           additionalProperties: false
56         network:
57           type: 'object'
58           properties:
59             ntp_strata_host1:
60               type: 'string'
61             ntp_strata_host2:
62               type: 'string'
63             node:
64               type: 'array'
65               items:
66                 type: 'object'
67                 properties:
68                   interfaces:
69                     type: 'array'
70                     items:
71                       type: ['string', 'null']
72                   busaddr:
73                     type: 'array'
74                     items:
75                       type: ['string', 'null']
76                 required: ['interfaces', 'busaddr']
77                 additionalProperties: false
78           required: ['node']
79           additionalProperties: false
80         reclass:  # Optional
81           type: 'object'
82           properties:
83             node:
84               type: 'array'
85               items:
86                 type: 'object'
87                 properties:
88                   compute_params:
89                     type: 'object'
90                     properties:
91                       common:  # Optional
92                         type: 'object'
93                         properties: &compute_params_common_properties
94                           nova_cpu_pinning:  # Optional
95                             type: 'string'
96                           compute_hugepages_size:
97                             type: 'string'
98                             enum: ['2M', '1G']
99                           compute_hugepages_count:
100                             type: 'number'
101                           compute_hugepages_mount:
102                             type: 'string'
103                           compute_kernel_isolcpu:  # Optional
104                             type: 'string'
105                           compute_ovs_pmd_cpu_mask:  # Optional
106                             type: ['string', 'number']
107                           compute_ovs_memory_channels:  # Optional
108                             type: ['string', 'number']
109                         required: ['compute_hugepages_size', 'compute_hugepages_count',
110                                    'compute_hugepages_mount']
111                         additionalProperties: false
112                       dpdk:  # Optional
113                         type: 'object'
114                         properties:
115                           <<: *compute_params_common_properties
116                           compute_dpdk_driver:
117                             type: 'string'
118                           compute_ovs_dpdk_socket_mem:
119                             type: ['string', 'number']
120                           compute_ovs_dpdk_lcore_mask:
121                             type: ['string', 'number']
122                           dpdk0_driver:
123                             type: 'string'
124                           dpdk0_n_rxq:
125                             type: 'number'
126                         required: ['compute_dpdk_driver', 'dpdk0_driver', 'dpdk0_n_rxq',
127                                    'compute_ovs_dpdk_socket_mem',
128                                    'compute_ovs_dpdk_lcore_mask']
129                         additionalProperties: false
130                     additionalProperties: false
131                 required: ['compute_params']
132                 additionalProperties: false
133           required: ['node']
134           additionalProperties: false
135       required: ['jumphost', 'network']
136       additionalProperties: false
137   osa:
138     v0.1:
139       type: ['object', 'null']
140       # NOTE: To be properly modeled by XCI maintainers
141
142 ##############################################################################
143 # Top-level structure:
144 # - define all possible top-level and second-level keys, without enforcing a
145 #   schema for second-level, just so we can disallow additional properties;
146 # - require 'version' and allow dynamically generated 'version_x.y' key;
147 properties:
148   idf:
149     properties:
150       # version_x.y keys are auto-added by `validate_schema.py` based on 'version'
151       version_0.1:
152         type: 'boolean'
153       version:
154         type: 'number'
155         enum: [0.1]
156       installer:
157         type: 'array'
158         items:
159           type: 'string'
160           enum: ['apex', 'compass4nfv', 'daisy', 'fuel', 'joid', 'osa']
161       net_config:
162         type: 'object'
163       compass:
164         type: 'object'
165       daisy:
166         type: 'object'
167       fuel:
168         type: 'object'
169       osa:
170         type: ['object', 'null']
171     required: ['version']
172     additionalProperties: false
173     ############################################################################
174     # Schema versioning
175     # - based on dynamically added 'version_x.y', require additional IDF blocks
176     #   and validate them against the proper schema version;
177     dependencies:
178       version_0.1:
179         properties:
180           net_config:
181             $ref: '#/definitions/net_config/v0.1'
182           compass:
183             $ref: '#/definitions/compass/v0.1'
184           daisy:
185             $ref: '#/definitions/daisy/v0.1'
186           fuel:
187             $ref: '#/definitions/fuel/v0.1'
188           osa:
189             $ref: '#/definitions/osa/v0.1'
190       fuel:
191         required: ['net_config']
192       daisy:
193         required: ['net_config']
194       osa:
195         required: ['net_config']
196   xci:
197     type: 'object'
198     # NOTE: To be properly modeled by XCI maintainers
199
200 # Do not allow any properties not defined here. This lets us catch typos.
201 additionalProperties: false
202 required: ['idf']