1 # Thierry Parmentelat - INRIA
4 from PLC.Nodes import Node
5 from PLC.Interfaces import Interface
6 from PLC.Slices import Slice
7 from PLC.Ilinks import Ilink
9 from PLC.Accessors.Factory import define_accessors, all_roles, tech_roles
12 current_module = sys.modules[__name__]
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
20 define_accessors(current_module, Node, "Arch", 'arch', 'node/config', 'architecture name',
21 get_roles=all_roles, set_roles=tech_roles )
22 # distribution to be deployed
23 define_accessors(current_module, Node, "Pldistro", 'pldistro', 'node/config', 'PlanetLab distribution',
24 get_roles=all_roles, set_roles=['admin'] )
25 # node deployment (alpha, beta, ...)
26 define_accessors(current_module, Node, "Deployment", "deployment", "node/operation",
27 'deployment flavour, typically "alpha", "beta", or "production"',
28 get_roles=all_roles, set_roles=['admin'])
31 define_accessors(current_module, Interface, "Ifname", "ifname", "interface/config", "linux name",
32 get_roles=all_roles, set_roles=tech_roles)
33 define_accessors(current_module, Interface, "Driver", "driver", "interface/config", "driver name",
34 get_roles=all_roles, set_roles=tech_roles)
35 define_accessors(current_module, Interface, "Alias", "alias", "interface/config", "interface alias",
36 get_roles=all_roles, set_roles=tech_roles)