Lua model » Historial » Versió 3
Joel Espunya, 25-06-2012 21:58
1 | 3 | Joel Espunya | !!h1. Lua model |
---|---|---|---|
2 | 1 | Pau Escrich | |
3 | h2. model |
||
4 | 2 | Pau Escrich | |
5 | 1 | Pau Escrich | - get(section,option) |
6 | - add(section,option,value=nil) |
||
7 | - del(section,option) |
||
8 | - set(section,option,value) |
||
9 | |||
10 | - get_type(type,index=nil,option=nil) |
||
11 | -> table[1..n][1..z] |
||
12 | -> table[1..n] |
||
13 | -> value |
||
14 | |||
15 | - get_indexes(type) |
||
16 | -> table[1..n] |
||
17 | |||
18 | - set_type(type,index=nil,option=nil,value) |
||
19 | |||
20 | - raw() -> ucicursor |
||
21 | |||
22 | 3 | Joel Espunya | h2. control |
23 | --- Remove the current bgp configuration |
||
24 | *remove_bgp_config()* |
||
25 | 1 | Pau Escrich | |
26 | 3 | Joel Espunya | --- Add a bgp peer |
27 | -- @param as AS of the BGP peer (if doesn't exist, it should be given as an argument) |
||
28 | -- @param ip IP of the BGP peer (if doesn't exist, it should be given as an argument) |
||
29 | -- @param netmask Netmask of the BGP peer (if doesn't exist, it should be given as an argument) |
||
30 | -- @return Boolean whether operation succeeded |
||
31 | *add_bgp_peer(as, ipdest, netmask)* |
||
32 | 1 | Pau Escrich | |
33 | 3 | Joel Espunya | --- Add a network to being published by bgp |
34 | -- @param network network range to be published (if doesn't exist, it should be given as an argument) |
||
35 | -- @return Boolean whether operation succeeded |
||
36 | *add_bgp_network(range)* |
||
37 | 1 | Pau Escrich | |
38 | |||
39 | 3 | Joel Espunya | --- Set the devices working on bpg mode |
40 | -- @param devices Devices working on bgp mode (if doesn't exist, it should be given as an argument) |
||
41 | -- @return Boolean whether operation succeeded |
||
42 | *set_bgp_devices(devices)* |
||
43 | 1 | Pau Escrich | |
44 | 3 | Joel Espunya | --- Set the AS of the working node |
45 | -- @class function |
||
46 | -- @name set_bgp_as |
||
47 | -- @param as AS of the working node (if doesn't exist, it should be given as an argument) |
||
48 | -- @return Boolean whether operation succeeded |
||
49 | *set_bgp_as(as)* |
||
50 | 1 | Pau Escrich | |
51 | 3 | Joel Espunya | --- Applies UCI configuration changes |
52 | -- @class function |
||
53 | -- @name apply_changes |
||
54 | *apply_changes()* |
||
55 | 1 | Pau Escrich | |
56 | |||
57 | 3 | Joel Espunya | h2. more information |
58 | |||
59 | 1 | Pau Escrich | http://wiki.openwrt.org/doc/techref/uci |
60 | http://luci.subsignal.org/api/luci |