1 # Thierry Parmentelat - INRIA
5 from PLC.Nodes import Node
6 from PLC.Interfaces import Interface
7 from PLC.Slices import Slice
8 #from PLC.Ilinks import Ilink
10 from PLC.Accessors.Factory import define_accessors, all_roles, tech_roles
13 current_module = sys.modules[__name__]
16 # most of these tag types are defined in MyPLC/db-config, so any details here in the
17 # description/category area is unlikely to make it into the database
21 # xxx - don't expose yet in api interface and slices dont know how to use that yet
22 define_accessors(current_module, Slice, "Vref", "vref",
23 "slice/config", "vserver reference image type",
24 get_roles=all_roles, set_roles=["admin"], expose_in_api=True)
28 define_accessors(current_module, Node, "Arch", "arch",
29 "node/config", "architecture name",
30 get_roles=all_roles, set_roles=tech_roles, expose_in_api=True)
31 # distribution to be deployed
32 define_accessors(current_module, Node, "Pldistro", "pldistro",
33 "node/config", "PlanetLab distribution",
34 get_roles=all_roles, set_roles=["admin"], expose_in_api=True)
35 # node deployment (alpha, beta, ...)
36 define_accessors(current_module, Node, "Deployment", "deployment",
37 "node/operation", 'typically "alpha", "beta", or "production"',
38 get_roles=all_roles, set_roles=["admin"], expose_in_api=True)
40 define_accessors(current_module, Node, "Extensions", "extensions",
41 "node/config", "space-separated list of extensions to install",
42 get_roles=all_roles, set_roles=["admin"])
43 # test nodes perform their installation from an uncompressed bootstrapfs
44 define_accessors(current_module, Node, "PlainBootstrapfs", "plain-bootstrapfs",
45 "node/config", "use uncompressed bootstrapfs when set",
46 get_roles=all_roles, set_roles=tech_roles)
49 # xxx - don't expose yet in api interface and slices dont know how to use that yet
50 define_accessors(current_module, Interface, "Ifname", "ifname",
51 "interface/config", "linux name",
52 get_roles=all_roles, set_roles=tech_roles, expose_in_api=True)
53 define_accessors(current_module, Interface, "Driver", "driver",
54 "interface/config", "driver name",
55 get_roles=all_roles, set_roles=tech_roles)
56 define_accessors(current_module, Interface, "Alias", "alias",
57 "interface/config", "interface alias",
58 get_roles=all_roles, set_roles=tech_roles)