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"],expose_in_api=True)
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)
48 # the tags considered when creating a boot CD
49 define_accessor(current_module, Node, "Serial", "serial",
50 "node/bootcd", "serial to use when creating the boot CD -- see GetBootMedium")
51 define_accessor(current_module, Node, "Cramfs", "cramfs",
52 "node/bootcd", "boot CD to use cramfs if set -- see GetBootMedium")
53 define_accessor(current_module, Node, "Kvariant", "kvariant",
54 "node/bootcd", "the variant to use for creating the boot CD -- see GetBootMedium")
55 define_accessor(current_module, Node, "Kargs", "kargs",
56 "node/bootcd", "extra args to pass the kernel on the Boot CD -- see GetBootMedium")
57 define_accessor(current_module, Node, "NoHangcheck", "no-hangcheck",
58 "node/bootcd", "disable hangcheck on the boot CD if set -- see GetBootMedium")
61 # xxx - don't expose yet in api interface and slices dont know how to use that yet
62 define_accessors(current_module, Interface, "Ifname", "ifname",
63 "interface/config", "linux name",
64 get_roles=all_roles, set_roles=tech_roles, expose_in_api=True)
65 define_accessors(current_module, Interface, "Driver", "driver",
66 "interface/config", "driver name",
67 get_roles=all_roles, set_roles=tech_roles)
68 define_accessors(current_module, Interface, "Alias", "alias",
69 "interface/config", "interface alias",
70 get_roles=all_roles, set_roles=tech_roles)