Lua model » Historial » Revisió 4
Revisió 3 (Joel Espunya, 25-06-2012 21:58) → Revisió 4/11 (Joel Espunya, 25-06-2012 21:59)
!!h1. Lua model h2. 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 h2. 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 -- @class function -- @name set_bgp_as -- @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 -- @class function -- @name apply_changes *apply_changes()* h2. more information http://wiki.openwrt.org/doc/techref/uci http://luci.subsignal.org/api/luci