Lua model » Historial » Revisió 4
« Anterior |
Revisió 4/11
(diferencies)
| Següent »
Joel Espunya, 25-06-2012 21:59
!!h1. Lua model
model¶
- get(section,option)
- add(section,option,value=nil)
- del(section,option)
- set(section,option,value)
- get_type(type,index=nil,option=nil)
-> table[1..n][1..z]
-> table[1..n]
-> value
- get_indexes(type)
-> table[1..n]
- set_type(type,index=nil,option=nil,value)
- raw() -> ucicursor
control
--- Remove the current bgp configuration
remove_bgp_config()¶
--- Add a bgp peer
-- @param as AS of the BGP peer (if doesn't exist, it should be given as an argument)
-- @param ip IP of the BGP peer (if doesn't exist, it should be given as an argument)
-- @param netmask Netmask of the BGP peer (if doesn't exist, it should be given as an argument)
-- @return Boolean whether operation succeeded
add_bgp_peer(as, ipdest, netmask)
--- Add a network to being published by bgp
-- @param network network range to be published (if doesn't exist, it should be given as an argument)
-- @return Boolean whether operation succeeded
add_bgp_network(range)
--- Set the devices working on bpg mode
-- @param devices Devices working on bgp mode (if doesn't exist, it should be given as an argument)
-- @return Boolean whether operation succeeded
set_bgp_devices(devices)
--- Set the AS of the working node
-- @param as AS of the working node (if doesn't exist, it should be given as an argument)
-- @return Boolean whether operation succeeded
set_bgp_as(as)
--- Applies UCI configuration changes
apply_changes()
more information¶
http://wiki.openwrt.org/doc/techref/uci
http://luci.subsignal.org/api/luci
Actualitzat per Joel Espunya fa més de 12 anys · 4 revisions