Add the section-type alias in the uci module

This commit is contained in:
Simon Schuster 2016-09-18 13:20:45 +02:00
parent 7a45984a4b
commit b48d89d3d8

View file

@ -287,7 +287,7 @@ function check_parameters(module)
or (not p["state"]) then
module:fail_json({msg="Both name and state are required to set/unset values"})
end
-- when performing an "uci set", a value is required
if ("set" == p["state"] or "present" == p["state"]) then
if p["name"]["option"] and not p["value"] then -- Setting a regular value
@ -317,7 +317,7 @@ function main(arg)
reload = { aliases = {"reload_configs", "reload-configs"}, type='bool'},
autocommit = { default=true, type="bool" },
forcelist = { default=false, type="bool" },
type = { type="str" },
type = { aliases = {"section-type"}, type="str" },
socket = { type="path" },
timeout = { type="int"}
})