Add the section-type alias in the uci module
This commit is contained in:
parent
7a45984a4b
commit
b48d89d3d8
1 changed files with 2 additions and 2 deletions
|
@ -287,7 +287,7 @@ function check_parameters(module)
|
||||||
or (not p["state"]) then
|
or (not p["state"]) then
|
||||||
module:fail_json({msg="Both name and state are required to set/unset values"})
|
module:fail_json({msg="Both name and state are required to set/unset values"})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- when performing an "uci set", a value is required
|
-- when performing an "uci set", a value is required
|
||||||
if ("set" == p["state"] or "present" == p["state"]) then
|
if ("set" == p["state"] or "present" == p["state"]) then
|
||||||
if p["name"]["option"] and not p["value"] then -- Setting a regular value
|
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'},
|
reload = { aliases = {"reload_configs", "reload-configs"}, type='bool'},
|
||||||
autocommit = { default=true, type="bool" },
|
autocommit = { default=true, type="bool" },
|
||||||
forcelist = { default=false, type="bool" },
|
forcelist = { default=false, type="bool" },
|
||||||
type = { type="str" },
|
type = { aliases = {"section-type"}, type="str" },
|
||||||
socket = { type="path" },
|
socket = { type="path" },
|
||||||
timeout = { type="int"}
|
timeout = { type="int"}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue