blob: 8e5d45f521f58caa88b83991793b19d8b214e7ff [file] [log] [blame]
Sean Condonde0b4dc2021-12-09 16:20:54 -08001{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "$id": "https://aetheropennetworking.org/roc/chronos-schema.json",
4 "title": "Chronos Config Schema",
5 "description": "A schema for validating the intermediate format for Chronos configuration",
6 "type": "object",
7 "properties": {
8 "sites": {
9 "description": "a collection of sites",
10 "type": "array",
11 "minItems": 1,
12 "uniqueItems": true,
13 "items": {
14 "type": "object",
15 "properties": {
16 "site-id": {
17 "type": "string",
18 "pattern": "^([a-zA-Z0-9\\-\\.-])*$",
19 "minLength": 3
20 },
21 "display-name": {
22 "type": "string",
23 "maxLength": 50
24 },
25 "image": {
26 "type": "string"
27 },
28 "small-cells": {
29 "type": "array",
30 "minItems": 1,
31 "uniqueItems": true,
32 "items": {
33 "type": "object",
34 "properties": {
35 "small-cell-id": {
36 "type": "string",
37 "pattern": "^([a-zA-Z0-9\\-\\.-])*$",
38 "minLength": 3
39 },
40 "display-name": {
41 "type": "string",
42 "maxLength": 50
43 }
44 },
45 "required": [
46 "small-cell-id",
47 "display-name"
48 ]
49 }
50 },
51 "slices": {
52 "type": "array",
53 "minItems": 1,
54 "uniqueItems": true,
55 "items": {
56 "type": "object",
57 "properties": {
58 "slice-id": {
59 "type": "string",
60 "pattern": "^([a-zA-Z0-9\\-\\.-])*$",
61 "minLength": 3
62 },
63 "display-name": {
64 "type": "string",
65 "maxLength": 50
66 },
67 "device-groups": {
68 "type": "array",
69 "items": {
70 "type": "string",
71 "uniqueItems": true
72 }
73 },
74 "applications": {
75 "type": "array",
76 "uniqueItems": true,
77 "items": {
78 "type": "string"
79 }
80 }
81 }
82 }
83 },
84 "device-groups": {
85 "type": "array",
86 "uniqueItems": true,
87 "items": {
88 "type": "object",
89 "properties": {
90 "device-group-id": {
91 "type": "string",
92 "pattern": "^([a-zA-Z0-9\\-\\.-])*$",
93 "minLength": 3
94 },
95 "display-name": {
96 "type": "string",
97 "maxLength": 50
98 },
99 "devices": {
100 "type": "array",
101 "items": {
102 "type": "string",
103 "uniqueItems": true
104 }
105 }
106 },
107 "required": [
108 "device-group-id",
109 "display-name"
110 ]
111 }
112 },
113 "devices": {
114 "type": "array",
115 "minItems": 1,
116 "uniqueItems": true,
117 "items": {
118 "type": "object",
119 "properties": {
120 "serial-number": {
121 "type": "string",
122 "pattern": "^([a-zA-Z0-9\\-\\.-])*$",
123 "minLength": 3
124 },
125 "imei": {
126 "type": "string",
127 "maxLength": 20
128 },
129 "display-name": {
130 "type": "string",
131 "maxLength": 50
132 },
133 "location": {
134 "type": "string",
135 "maxLength": 50
136 },
137 "type": {
138 "type": "string"
139 },
140 "sim": {
141 "type": "string"
142 }
143 },
144 "required": [
145 "serial-number",
146 "imei",
147 "display-name",
148 "type"
149 ]
150 }
151 },
152 "sims": {
153 "type": "array",
154 "minItems": 1,
155 "uniqueItems": true,
156 "items": {
157 "type": "object",
158 "properties": {
159 "iccid": {
160 "type": "string",
161 "pattern": "^([a-zA-Z0-9\\-\\.-])*$",
162 "minLength": 3
163 },
164 "display-name": {
165 "type": "string",
166 "maxLength": 50
167 }
168 },
169 "required": [
170 "iccid"
171 ]
172 }
173 }
174 },
175 "required": [
176 "site-id",
177 "small-cells",
178 "slices",
179 "device-groups",
180 "devices",
181 "sims"
182 ]
183 }
184 },
185 "applications": {
186 "type": "array",
187 "minItems": 1,
188 "uniqueItems": true,
189 "items": {
190 "type": "object",
191 "properties": {
192 "application-id": {
193 "type": "string",
194 "pattern": "^([a-zA-Z0-9\\-\\.-])*$",
195 "minLength": 3
196 },
197 "display-name": {
198 "type": "string",
199 "maxLength": 50
200 }
201 },
202 "required": [
203 "application-id",
204 "display-name"
205 ]
206 }
207 }
208 },
209 "required": [
210 "sites",
211 "applications"
212 ]
213}