[IDF] Schema: Add OSA installer stubs
[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             node:
60               type: 'array'
61               items:
62                 type: 'object'
63                 properties:
64                   interfaces:
65                     type: 'array'
66                     items:
67                       type: ['string', 'null']
68                   busaddr:
69                     type: 'array'
70                     items:
71                       type: ['string', 'null']
72                 required: ['interfaces', 'busaddr']
73                 additionalProperties: false
74           required: ['node']
75           additionalProperties: false
76       required: ['jumphost', 'network']
77       additionalProperties: false
78   osa:
79     v0.1:
80       type: 'object'
81       # NOTE: To be properly modeled by XCI maintainers
82
83 ##############################################################################
84 # Top-level structure:
85 # - define all possible top-level and second-level keys, without enforcing a
86 #   schema for second-level, just so we can disallow additional properties;
87 # - require 'version' and allow dynamically generated 'version_x.y' key;
88 properties:
89   idf:
90     properties:
91       # version_x.y keys are auto-added by `validate_schema.py` based on 'version'
92       version_0.1:
93         type: 'boolean'
94       version:
95         type: 'number'
96         enum: [0.1]
97       installer:
98         type: 'array'
99         items:
100           type: 'string'
101           enum: ['apex', 'compass4nfv', 'daisy', 'fuel', 'joid', 'osa']
102       net_config:
103         type: 'object'
104       compass:
105         type: 'object'
106       daisy:
107         type: 'object'
108       fuel:
109         type: 'object'
110       osa:
111         type: 'object'
112     required: ['version']
113     additionalProperties: false
114     ############################################################################
115     # Schema versioning
116     # - based on dynamically added 'version_x.y', require additional IDF blocks
117     #   and validate them against the proper schema version;
118     dependencies:
119       version_0.1:
120         properties:
121           net_config:
122             $ref: '#/definitions/net_config/v0.1'
123           compass:
124             $ref: '#/definitions/compass/v0.1'
125           daisy:
126             $ref: '#/definitions/daisy/v0.1'
127           fuel:
128             $ref: '#/definitions/fuel/v0.1'
129           osa:
130             $ref: '#/definitions/osa/v0.1'
131       fuel:
132         required: ['net_config']
133       daisy:
134         required: ['net_config']
135       osa:
136         required: ['net_config']
137
138 # Do not allow any properties not defined here. This lets us catch typos.
139 additionalProperties: false
140 required: ['idf']