* luci/libs/uvl: implement default value option for variable sections
[oweals/luci.git] / libs / uvl / root / lib / uci / schema / meta / schema
index 2454a188c6efad42f2dd10d1472f25c18a32a8a1..7f6981a024e9c153b82aeea095dfdfb2c83d32b9 100644 (file)
@@ -1,8 +1,5 @@
 # UVL - Reference-Spec
 # This is a meta scheme defining the format of uci schemes.
-# Note that this spec is overly strict, it requires that the "depends",
-# "valueof" and "validator" fields are of type list but if only one value is
-# given, the notation as "option" is allowed too.
 # $Id$
 
 package schema
@@ -38,7 +35,7 @@ config variable
        option name             'description'
        option title    'Description of the defined package'
        option section  'schema.package'
-       option type             'variable'
+       option type             'lazylist'
        option datatype 'string'
        option required false
 
@@ -92,7 +89,7 @@ config variable
        option name             'description'
        option title    'Description of the defined section'
        option section  'schema.section'
-       option type             'variable'
+       option type             'lazylist'
        option datatype 'string'
        option required false
 
@@ -101,7 +98,7 @@ config variable
        option name             'depends'
        option title    'List of dependencies within and between defined sections'
        option section  'schema.section'
-       option type             'list'
+       option type             'lazylist'
        option datatype 'string'
        option required false
 
@@ -191,7 +188,7 @@ config variable
        option name             'description'
        option title    'Description of the defined variable'
        option section  'schema.variable'
-       option type             'variable'
+       option type             'lazylist'
        option datatype 'string'
        option required false
 
@@ -200,7 +197,7 @@ config variable
        option name             'depends'
        option title    'List of dependencies between defined variables'
        option section  'schema.variable'
-       option type             'list'
+       option type             'lazylist'
        option datatype 'string'
        option required false
 
@@ -213,6 +210,15 @@ config variable
        option datatype 'boolean'
        option required false
 
+# Variable multiple values flag (schema.@variable.multival)
+config variable
+       option name             'multival'
+       option title    'Specify whether this variable may contain multiple values separated by space'
+       option section  'schema.variable'
+       option type             'variable'
+       option datatype 'boolean'
+       option required false
+
 # Variable type (schema.@variable.type)
 config variable
        option name             'type'
@@ -240,6 +246,12 @@ config enum
        option title    'This is a list variable'
        option variable 'schema.variable.type'
 
+# List-or-Option variable type (schema.@variable.type=lazylist)
+config enum
+       option value    'lazylist'
+       option title    'This is a list or option variable'
+       option variable 'schema.variable.type'
+
 # Reference variable type (schema.@variable.type=reference)
 config enum
        option value    'reference'
@@ -255,12 +267,21 @@ config variable
        option datatype 'string'
        option required false
 
+# Variable default value (schema.@variable.default)
+config variable
+       option name             'default'
+       option title    'Datatype of this variable'
+       option section  'schema.variable'
+       option type             'variable'
+       option datatype 'string'
+       option required false
+
 # Variable validators (schema.@variable.validator)
 config variable
        option name             'validator'
        option title    'Datatype of this variable'
        option section  'schema.variable'
-       option type             'list'
+       option type             'lazylist'
        option datatype 'string'
        option required false
 
@@ -269,7 +290,7 @@ config variable
        option name             'valueof'
        option title    'Reference to section or option to read values from'
        option section  'schema.variable'
-       option type             'list'
+       option type             'lazylist'
        option datatype 'string'
        option required false
 
@@ -293,8 +314,8 @@ config section
 
 # Enum value (schema.@enum.value)
 config variable
-       option name             'name'
-       option title    'Name of the defined variable'
+       option name             'value'
+       option title    'Value of the defined enum value'
        option section  'schema.enum'
        option type             'variable'
        option datatype 'string'
@@ -323,7 +344,7 @@ config variable
        option name             'description'
        option title    'Description of the defined enum value'
        option section  'schema.enum'
-       option type             'variable'
+       option type             'lazylist'
        option datatype 'string'
        option required false
 
@@ -332,7 +353,7 @@ config variable
        option name             'depends'
        option title    'List of dependencies on defined variables'
        option section  'schema.enum'
-       option type             'list'
+       option type             'lazylist'
        option datatype 'string'
        option required false