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 section definition
15 #-------------------------------------------------------------------------------
17 # Section definition (schema.@section)
20 option title 'Definition of uci section'
21 option package 'schema'
27 # Section name (schema.@section.name)
30 option title 'Name of the defined section'
31 option section 'schema.section'
32 option type 'variable'
33 option datatype 'string'
36 # Section package (schema.@section.package)
39 option title 'Parent package of the defined section'
40 option section 'schema.section'
41 option type 'variable'
42 option datatype 'string'
45 # Section title (schema.@section.title)
48 option title 'Title of the defined section'
49 option section 'schema.section'
50 option type 'variable'
51 option datatype 'string'
54 # Section description (schema.@section.description)
56 option name 'description'
57 option title 'Description of the defined section'
58 option section 'schema.section'
59 option type 'variable'
60 option datatype 'string'
63 # Section dependencies (schema.@section.depends)
66 option title 'List of dependencies within and between defined sections'
67 option section 'schema.section'
69 option datatype 'string'
72 # Section required flag (schema.@section.required)
74 option name 'required'
75 option title 'Specify whether at least one instance of this section type must be defined in config'
76 option section 'schema.section'
77 option type 'variable'
78 option datatype 'boolean'
81 # Section unique flag (schema.@section.unique)
84 option title 'Specify whether only one instance of this section type is allowed in config'
85 option section 'schema.section'
86 option type 'variable'
87 option datatype 'boolean'
90 # Section named flag (schema.@section.named)
93 option title 'Specify whether sections of this type must have a name set (are not anonymous)'
94 option section 'schema.section'
95 option type 'variable'
96 option datatype 'boolean'
99 # Section dynamic flag (schema.@section.dynamic)
101 option name 'dynamic'
102 option title 'Specify whether sections of this type may contain arbitary, not specified options'
103 option section 'schema.section'
104 option type 'variable'
105 option datatype 'boolean'
106 option required false
109 #-------------------------------------------------------------------------------
110 # Central variable definition
114 #-------------------------------------------------------------------------------
116 # Variable definition (schema.@variable)
118 option name 'variable'
119 option title 'Definition of uci variable'
120 option package 'schema'
121 option required false
126 # Variable name (schema.@variable.name)
129 option title 'Name of the defined variable'
130 option section 'schema.variable'
131 option type 'variable'
132 option datatype 'string'
135 # Variable section (schema.@variable.section)
137 option name 'section'
138 option title 'Parent section of the defined variable'
139 option section 'schema.variable'
140 option type 'variable'
141 option datatype 'string'
144 # Variable title (schema.@variable.title)
147 option title 'Title of the defined variable'
148 option section 'schema.variable'
149 option type 'variable'
150 option datatype 'string'
151 option required false
153 # Variable description (schema.@variable.description)
155 option name 'description'
156 option title 'Description of the defined variable'
157 option section 'schema.variable'
158 option type 'variable'
159 option datatype 'string'
160 option required false
162 # Variable dependencies (schema.@variable.depends)
164 option name 'depends'
165 option title 'List of dependencies between defined variables'
166 option section 'schema.variable'
168 option datatype 'string'
169 option required false
171 # Variable required flag (schema.@variable.required)
173 option name 'required'
174 option title 'Specify whether this variable must be set in config'
175 option section 'schema.variable'
176 option type 'variable'
177 option datatype 'boolean'
178 option required false
180 # Variable type (schema.@variable.type)
183 option title 'Type of this variable'
184 option section 'schema.variable'
186 option datatype 'string'
187 option required false
189 # Plain variable type (schema.@variable.type=variable)
191 option value 'variable'
192 option title 'This is a plain variable'
193 option variable 'schema.variable.type'
195 # Enum variable type (schema.@variable.type=enum)
198 option title 'This is a enum variable'
199 option variable 'schema.variable.type'
201 # List variable type (schema.@variable.type=list)
204 option title 'This is a list variable'
205 option variable 'schema.variable.type'
207 # Reference variable type (schema.@variable.type=reference)
209 option value 'reference'
210 option title 'This is a reference (valueof) variable'
211 option variable 'schema.variable.type'
213 # Variable datatype (schema.@variable.datatype)
215 option name 'datatype'
216 option title 'Datatype of this variable'
217 option section 'schema.variable'
218 option type 'variable'
219 option datatype 'string'
220 option required false
222 # Variable validators (schema.@variable.validator)
224 option name 'validator'
225 option title 'Datatype of this variable'
226 option section 'schema.variable'
228 option datatype 'string'
229 option required false
231 # Variable value references (schema.@variable.valueof)
233 option name 'valueof'
234 option title 'Reference to section or option to read values from'
235 option section 'schema.variable'
237 option datatype 'string'
238 option required false
241 #-------------------------------------------------------------------------------
242 # Central enum definition
246 #-------------------------------------------------------------------------------
248 # Enum definition (schema.@enum)
251 option title 'Definition of uci enum value'
252 option package 'schema'
253 option required false
258 # Enum value (schema.@enum.value)
261 option title 'Name of the defined variable'
262 option section 'schema.enum'
263 option type 'variable'
264 option datatype 'string'
267 # Enum variable (schema.@enum.variable)
269 option name 'variable'
270 option title 'Parent variable of the defined enum value'
271 option section 'schema.enum'
272 option type 'variable'
273 option datatype 'string'
276 # Enum value title (schema.@enum.title)
279 option title 'Title of the defined enum value'
280 option section 'schema.enum'
281 option type 'variable'
282 option datatype 'string'
283 option required false
285 # Enum value description (schema.@enum.description)
287 option name 'description'
288 option title 'Description of the defined enum value'
289 option section 'schema.enum'
290 option type 'variable'
291 option datatype 'string'
292 option required false
294 # Enum value dependencies (schema.@enum.depends)
296 option name 'depends'
297 option title 'List of dependencies on defined variables'
298 option section 'schema.enum'
300 option datatype 'string'
301 option required false
303 # Enum value default flag (schema.@enum.default)
305 option name 'default'
306 option title 'Specify whether this value is the default value of the parent enum'
307 option section 'schema.enum'
308 option type 'variable'
309 option datatype 'boolean'
310 option required false