2 # This is a meta scheme defining the format of uci schemes.
3 # Note that this spec is overly strict, it requires that the "depends",
4 # "valueof" and "validator" fields are of type list but if only one value is
5 # given, the notation as "option" is allowed too.
10 #-------------------------------------------------------------------------------
11 # Central package definition
15 #-------------------------------------------------------------------------------
17 # Section definition (schema.@package)
20 option title 'Definition of uci package'
21 option package 'schema'
27 # Section title (schema.@package.title)
30 option title 'Title of the defined package'
31 option section 'schema.package'
32 option type 'variable'
33 option datatype 'string'
36 # Section description (schema.@package.description)
38 option name 'description'
39 option title 'Description of the defined package'
40 option section 'schema.package'
41 option type 'lazylist'
42 option datatype 'string'
46 #-------------------------------------------------------------------------------
47 # Central section definition
51 #-------------------------------------------------------------------------------
53 # Section definition (schema.@section)
56 option title 'Definition of uci section'
57 option package 'schema'
63 # Section name (schema.@section.name)
66 option title 'Name of the defined section'
67 option section 'schema.section'
68 option type 'variable'
69 option datatype 'string'
72 # Section package (schema.@section.package)
75 option title 'Parent package of the defined section'
76 option section 'schema.section'
77 option type 'variable'
78 option datatype 'string'
81 # Section title (schema.@section.title)
84 option title 'Title of the defined section'
85 option section 'schema.section'
86 option type 'variable'
87 option datatype 'string'
90 # Section description (schema.@section.description)
92 option name 'description'
93 option title 'Description of the defined section'
94 option section 'schema.section'
95 option type 'lazylist'
96 option datatype 'string'
99 # Section dependencies (schema.@section.depends)
101 option name 'depends'
102 option title 'List of dependencies within and between defined sections'
103 option section 'schema.section'
104 option type 'lazylist'
105 option datatype 'string'
106 option required false
108 # Section required flag (schema.@section.required)
110 option name 'required'
111 option title 'Specify whether at least one instance of this section type must be defined in config'
112 option section 'schema.section'
113 option type 'variable'
114 option datatype 'boolean'
115 option required false
117 # Section unique flag (schema.@section.unique)
120 option title 'Specify whether only one instance of this section type is allowed in config'
121 option section 'schema.section'
122 option type 'variable'
123 option datatype 'boolean'
124 option required false
126 # Section named flag (schema.@section.named)
129 option title 'Specify whether sections of this type must have a name set (are not anonymous)'
130 option section 'schema.section'
131 option type 'variable'
132 option datatype 'boolean'
133 option required false
135 # Section dynamic flag (schema.@section.dynamic)
137 option name 'dynamic'
138 option title 'Specify whether sections of this type may contain arbitary, not specified options'
139 option section 'schema.section'
140 option type 'variable'
141 option datatype 'boolean'
142 option required false
145 #-------------------------------------------------------------------------------
146 # Central variable definition
150 #-------------------------------------------------------------------------------
152 # Variable definition (schema.@variable)
154 option name 'variable'
155 option title 'Definition of uci variable'
156 option package 'schema'
157 option required false
162 # Variable name (schema.@variable.name)
165 option title 'Name of the defined variable'
166 option section 'schema.variable'
167 option type 'variable'
168 option datatype 'string'
171 # Variable section (schema.@variable.section)
173 option name 'section'
174 option title 'Parent section of the defined variable'
175 option section 'schema.variable'
176 option type 'variable'
177 option datatype 'string'
180 # Variable title (schema.@variable.title)
183 option title 'Title of the defined variable'
184 option section 'schema.variable'
185 option type 'variable'
186 option datatype 'string'
187 option required false
189 # Variable description (schema.@variable.description)
191 option name 'description'
192 option title 'Description of the defined variable'
193 option section 'schema.variable'
194 option type 'lazylist'
195 option datatype 'string'
196 option required false
198 # Variable dependencies (schema.@variable.depends)
200 option name 'depends'
201 option title 'List of dependencies between defined variables'
202 option section 'schema.variable'
203 option type 'lazylist'
204 option datatype 'string'
205 option required false
207 # Variable required flag (schema.@variable.required)
209 option name 'required'
210 option title 'Specify whether this variable must be set in config'
211 option section 'schema.variable'
212 option type 'variable'
213 option datatype 'boolean'
214 option required false
216 # Variable type (schema.@variable.type)
219 option title 'Type of this variable'
220 option section 'schema.variable'
222 option datatype 'string'
223 option required false
225 # Plain variable type (schema.@variable.type=variable)
227 option value 'variable'
228 option title 'This is a plain variable'
229 option variable 'schema.variable.type'
231 # Enum variable type (schema.@variable.type=enum)
234 option title 'This is a enum variable'
235 option variable 'schema.variable.type'
237 # List variable type (schema.@variable.type=list)
240 option title 'This is a list variable'
241 option variable 'schema.variable.type'
243 # List-or-Option variable type (schema.@variable.type=lazylist)
245 option value 'lazylist'
246 option title 'This is a list or option variable'
247 option variable 'schema.variable.type'
249 # Reference variable type (schema.@variable.type=reference)
251 option value 'reference'
252 option title 'This is a reference (valueof) variable'
253 option variable 'schema.variable.type'
255 # Variable datatype (schema.@variable.datatype)
257 option name 'datatype'
258 option title 'Datatype of this variable'
259 option section 'schema.variable'
260 option type 'variable'
261 option datatype 'string'
262 option required false
264 # Variable validators (schema.@variable.validator)
266 option name 'validator'
267 option title 'Datatype of this variable'
268 option section 'schema.variable'
269 option type 'lazylist'
270 option datatype 'string'
271 option required false
273 # Variable value references (schema.@variable.valueof)
275 option name 'valueof'
276 option title 'Reference to section or option to read values from'
277 option section 'schema.variable'
278 option type 'lazylist'
279 option datatype 'string'
280 option required false
283 #-------------------------------------------------------------------------------
284 # Central enum definition
288 #-------------------------------------------------------------------------------
290 # Enum definition (schema.@enum)
293 option title 'Definition of uci enum value'
294 option package 'schema'
295 option required false
300 # Enum value (schema.@enum.value)
303 option title 'Name of the defined variable'
304 option section 'schema.enum'
305 option type 'variable'
306 option datatype 'string'
309 # Enum variable (schema.@enum.variable)
311 option name 'variable'
312 option title 'Parent variable of the defined enum value'
313 option section 'schema.enum'
314 option type 'variable'
315 option datatype 'string'
318 # Enum value title (schema.@enum.title)
321 option title 'Title of the defined enum value'
322 option section 'schema.enum'
323 option type 'variable'
324 option datatype 'string'
325 option required false
327 # Enum value description (schema.@enum.description)
329 option name 'description'
330 option title 'Description of the defined enum value'
331 option section 'schema.enum'
332 option type 'lazylist'
333 option datatype 'string'
334 option required false
336 # Enum value dependencies (schema.@enum.depends)
338 option name 'depends'
339 option title 'List of dependencies on defined variables'
340 option section 'schema.enum'
341 option type 'lazylist'
342 option datatype 'string'
343 option required false
345 # Enum value default flag (schema.@enum.default)
347 option name 'default'
348 option title 'Specify whether this value is the default value of the parent enum'
349 option section 'schema.enum'
350 option type 'variable'
351 option datatype 'boolean'
352 option required false