Renaming a named section to a different name using util.ubus function

I was trying to perform a rename of a section name using the util.ubus function. For some reason it doesn't seem to be working.

uci file name is testConfig.

config interface 'lan'
	option test 'allow'

wanted to rename the named section 'lan' to 'wan' and retain rest of the options as it is.
After renaming , expected the config to look like below.

config interface 'wan'
	option test 'allow'

function call

luci.util.ubus("uci", "rename", {
        config = 'testConfig',
        type = 'interface',
        name = 'lan',
        values = 'wan'

Lua does not give any error, but the value also does not get changed.

Am i missing something very basic?

uci commit testConfig

Sorry for not mentioning. I had done the commit as well.

Is rename via util.ubus function a valid one ?

Need support. Anything else to be checked??

Your arguments are wrong. Needs to be

util.ubus("uci", "rename", {
    config = "testConfig", 
    section = "lan", 
    name = "wan"

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.