e95e2241e9afbb23a35e7e967f45597a102798ef
[myplc.git] / db-config.d / 03-interfacesettings
1 #################### interface settings
2 # xxx this should move to PLC/Accessors
3
4 # Setup default slice attribute types
5 setting_types = \
6 [
7     {'category' : "interface/general",
8      'tagname' : "ifname",
9      'description': "Set interface name, instead of eth0 or the like",
10      'min_role_id' : 40},
11
12     {'category' : "interface/multihome",
13      'tagname' : "alias",
14      'description': "Specifies that the network is used for multihoming",
15      'min_role_id' : 40},
16     
17     {'category' : "interface/hidden",
18      'tagname' : "backdoor",
19      'description': "For testing new settings",
20      'min_role_id' : 10},
21     ] + [
22
23     { 'category' : "interface/wifi",
24       'tagname' : x,
25       'description' : "802.11 %s -- see %s"%(y,z),
26       'min_role_id' : 40 } for (x,y,z) in [
27
28     ("mode","Mode","iwconfig"),
29
30     ("essid","ESSID","iwconfig"),
31
32     ("nw","Network Id","iwconfig"),
33
34     ("freq","Frequency","iwconfig"),
35
36     ("channel","Channel","iwconfig"),
37
38     ("sens","sensitivity threshold","iwconfig"),
39
40     ("rate","Rate","iwconfig"),
41
42     ("key","key","iwconfig key"),
43
44     ("key1","key1","iwconfig key [1]"),
45
46     ("key2","key2","iwconfig key [2]"),
47
48     ("key3","key3","iwconfig key [3]"),
49
50     ("key4","key4","iwconfig key [4]"),
51
52     ("securitymode","Security mode","iwconfig enc"),
53
54     ("iwconfig","Additional parameters to iwconfig","ifup-wireless"),
55
56     ("iwpriv","Additional parameters to iwpriv","ifup-wireless"),
57
58     ]
59     ]
60
61 for setting_type in setting_types:
62     SetTagType(setting_type)