spelling
[plcapi.git] / PLC / Accessors / Accessors_standard.py
1 # Thierry Parmentelat - INRIA
2 # $Id$
3
4 from PLC.Nodes import Node
5 from PLC.Interfaces import Interface
6 from PLC.Slices import Slice
7 from PLC.Ilinks import Ilink
8
9 from PLC.Accessors.Factory import define_accessors, all_roles, tech_roles
10
11 import sys
12 current_module = sys.modules[__name__]
13
14 # NOTE.
15 # most of these tag types are defined in MyPLC/db-config, so any details here in the 
16 # description/category area is unlikely to make it into the database
17 #
18
19 # slice vref
20 define_accessors(current_module, Slice, "Vref", 'vref', 'slice/config', 'vserver reference image type',
21                  get_roles=all_roles, set_roles=['admin'])
22
23
24 # node architecture 
25 define_accessors(current_module, Node, "Arch", 'arch',  'node/config', 'architecture name', 
26                  get_roles=all_roles, set_roles=tech_roles )
27 # distribution to be deployed
28 define_accessors(current_module, Node, "Pldistro", 'pldistro',  'node/config', 'PlanetLab distribution', 
29                  get_roles=all_roles, set_roles=['admin'] )
30 # node deployment (alpha, beta, ...)
31 define_accessors(current_module, Node, "Deployment", "deployment", "node/operation", 
32                  'deployment flavour, typically "alpha", "beta", or "production"',
33                  get_roles=all_roles, set_roles=['admin'])
34 # extension
35 define_accessors(current_module, Node, "Extensions", "extensions", "node/config", "space-separated list of extensions to install",
36                  get_roles=all_roles, set_roles=['admin'])
37 # test nodes perform their installation from an uncompressed bootstrapfs
38 define_accessors(current_module, Node, "PlainBootstrapfs", "plain-bootstrapfs", "node/config", "use uncompressed bootstrapfs when set",
39                  get_roles=all_roles, set_roles=['admin','pi','tech'])
40
41 # interface accessors
42 define_accessors(current_module, Interface, "Ifname", "ifname", "interface/config", "linux name",
43                  get_roles=all_roles, set_roles=tech_roles)
44 define_accessors(current_module, Interface, "Driver", "driver", "interface/config", "driver name",
45                  get_roles=all_roles, set_roles=tech_roles)
46 define_accessors(current_module, Interface, "Alias", "alias", "interface/config", "interface alias",
47                  get_roles=all_roles, set_roles=tech_roles)