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 'variable'
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 'variable'
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'
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 'variable'
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'
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 # Reference variable type (schema.@variable.type=reference)
245 option value 'reference'
246 option title 'This is a reference (valueof) variable'
247 option variable 'schema.variable.type'
249 # Variable datatype (schema.@variable.datatype)
251 option name 'datatype'
252 option title 'Datatype of this variable'
253 option section 'schema.variable'
254 option type 'variable'
255 option datatype 'string'
256 option required false
258 # Variable validators (schema.@variable.validator)
260 option name 'validator'
261 option title 'Datatype of this variable'
262 option section 'schema.variable'
264 option datatype 'string'
265 option required false
267 # Variable value references (schema.@variable.valueof)
269 option name 'valueof'
270 option title 'Reference to section or option to read values from'
271 option section 'schema.variable'
273 option datatype 'string'
274 option required false
277 #-------------------------------------------------------------------------------
278 # Central enum definition
282 #-------------------------------------------------------------------------------
284 # Enum definition (schema.@enum)
287 option title 'Definition of uci enum value'
288 option package 'schema'
289 option required false
294 # Enum value (schema.@enum.value)
297 option title 'Name of the defined variable'
298 option section 'schema.enum'
299 option type 'variable'
300 option datatype 'string'
303 # Enum variable (schema.@enum.variable)
305 option name 'variable'
306 option title 'Parent variable of the defined enum value'
307 option section 'schema.enum'
308 option type 'variable'
309 option datatype 'string'
312 # Enum value title (schema.@enum.title)
315 option title 'Title of the defined enum value'
316 option section 'schema.enum'
317 option type 'variable'
318 option datatype 'string'
319 option required false
321 # Enum value description (schema.@enum.description)
323 option name 'description'
324 option title 'Description of the defined enum value'
325 option section 'schema.enum'
326 option type 'variable'
327 option datatype 'string'
328 option required false
330 # Enum value dependencies (schema.@enum.depends)
332 option name 'depends'
333 option title 'List of dependencies on defined variables'
334 option section 'schema.enum'
336 option datatype 'string'
337 option required false
339 # Enum value default flag (schema.@enum.default)
341 option name 'default'
342 option title 'Specify whether this value is the default value of the parent enum'
343 option section 'schema.enum'
344 option type 'variable'
345 option datatype 'boolean'
346 option required false