-- @param config Name of the configuration to validate
-- @return Boolean indicating whether the given config validates
-- @return String containing the reason for errors (if any)
-function UVL.validate_config( self, config )
+function UVL.validate_config( self, config, uci )
if not self.packages[config] then
local ok, err = self:read_scheme(config)
end
end
- local co = luci.uvl.config( self, config )
+ local co = luci.uvl.config( self, uci or config, uci and config )
local sc = { }
self.beenthere = { }
-- @param section Name of the section to validate
-- @return Boolean indicating whether the given config validates
-- @return String containing the reason for errors (if any)
-function UVL.validate_section( self, config, section )
+function UVL.validate_section( self, config, section, uci )
if not self.packages[config] then
local ok, err = self:read_scheme( config )
end
end
- local co = luci.uvl.config( self, config )
+ local co = luci.uvl.config( self, uci or config, uci and config )
local so = co:section( section )
self.beenthere = { }
-- @param option Name of the option to validate
-- @return Boolean indicating whether the given config validates
-- @return String containing the reason for errors (if any)
-function UVL.validate_option( self, config, section, option )
+function UVL.validate_option( self, config, section, option, uci )
if not self.packages[config] then
local ok, err = self:read_scheme( config )
end
end
- local co = luci.uvl.config( self, config )
+ local co = luci.uvl.config( self, uci or config, uci and config )
local so = co:section( section )
local oo = so:option( option )