Delete list and Rename list

I was trying to perform a del_list of a list using the util.ubus function.
So I want know what is the perfect util.ubus code for delete and rename a list.

uci file name is testConfig.

config interface 'Allow'
	list testlist 'aaa'
	list testlist  'Anything'

wanted to delete only testlist 'aaa'.Also want to rename it.

function call

luci.util.ubus("uci", "del_list", {
	config = 'testConfig',
	section = 'interface ',
	type = 'Allow',
	name = 'testlist ',
	value = {'aaa'}

Its not working.

Unless you want to stick with util.ubus for some reason, you could use luci.model.uci and if you search the forum, @jow had posted the uci_del_list solution: Luci model/cbi questions.

1 Like