new global PLC_FLAVOUR category to globally chose sliver vref image
[plcapi.git] / PLC / Accessors / Accessors_standard.py
index f158273..1e28b87 100644 (file)
@@ -1,5 +1,6 @@
 # Thierry Parmentelat - INRIA
 # $Id$
+# $URL$
 
 from PLC.Nodes import Node
 from PLC.Interfaces import Interface
@@ -16,20 +17,40 @@ current_module = sys.modules[__name__]
 # description/category area is unlikely to make it into the database
 #
 
-# slice vref
-# xxx - don't expose yet in api interface and slices dont know how to use that yet
+# 
+### system slices - at least planetflow - still rely on 'vref'
+# 
+
+# These following accessors are mostly of interest for implementing the 
+# GetSliceFamily method, that takes into account the vref attribute, 
+# as well as the 3 attributes below, and the PLC_FLAVOUR config category
+
+### slice vref 
 define_accessors(current_module, Slice, "Vref", "vref", 
-                 "slice/config", "vserver reference image type",
-                 get_roles=all_roles, set_roles=["admin"], expose_in_api=False)
+                 "slice/config", "vserver reference image name",
+                 get_roles=all_roles, set_roles=["admin"], expose_in_api=True)
 
+# xxx the accessor factory should enforce the category and descriptions provided here.
+# and BTW the tag should be created right away as far as possible, or at least when a Get is issued
+# also note that the two 'arch' instances use here will end in the same unique TagType object,
+# so you should make sure to use the same category/description for both 
+define_accessors(current_module, Slice, "Arch", "arch", 
+                 "node/slice/config", "node arch or slivers arch",
+                 get_roles=all_roles, set_roles=["user"], expose_in_api=True)
+define_accessors(current_module, Slice, "Pldistro", "pldistro",
+                 "node/slice/config", "PlanetLab distribution to use for node or slivers", 
+                 get_roles=all_roles, set_roles=["admin"], expose_in_api=True)
+define_accessors(current_module, Slice, "Fcdistro", "fcdistro",
+                 "node/slice/config", "Fedora or CentOS distribution to use for node or slivers", 
+                 get_roles=all_roles, set_roles=["admin"], expose_in_api=True)
 
 # node architecture 
 define_accessors(current_module, Node, "Arch", "arch",  
-                 "node/config", "architecture name", 
+                 "node/slice/config", "node arch or slivers arch",
                  get_roles=all_roles, set_roles=tech_roles, expose_in_api=True)
 # distribution to be deployed
 define_accessors(current_module, Node, "Pldistro", "pldistro",
-                 "node/config", "PlanetLab distribution", 
+                 "node/slice/config", "PlanetLab distribution to use for node or slivers", 
                  get_roles=all_roles, set_roles=["admin"], expose_in_api=True)
 # node deployment (alpha, beta, ...)
 define_accessors(current_module, Node, "Deployment", "deployment",
@@ -38,12 +59,24 @@ define_accessors(current_module, Node, "Deployment", "deployment",
 # extension
 define_accessors(current_module, Node, "Extensions", "extensions", 
                  "node/config", "space-separated list of extensions to install",
-                 get_roles=all_roles, set_roles=["admin"])
+                 get_roles=all_roles, set_roles=["admin"],expose_in_api=True)
 # test nodes perform their installation from an uncompressed bootstrapfs
 define_accessors(current_module, Node, "PlainBootstrapfs", "plain-bootstrapfs", 
                  "node/config", "use uncompressed bootstrapfs when set",
                  get_roles=all_roles, set_roles=tech_roles)
 
+# the tags considered when creating a boot CD
+define_accessors(current_module, Node, "Serial", "serial",
+                 "node/bootcd", "serial to use when creating the boot CD -- see GetBootMedium")
+define_accessors(current_module, Node, "Cramfs", "cramfs",
+                 "node/bootcd", "boot CD to use cramfs if set -- see GetBootMedium")
+define_accessors(current_module, Node, "Kvariant", "kvariant",
+                 "node/bootcd", "the variant to use for creating the boot CD -- see GetBootMedium")
+define_accessors(current_module, Node, "Kargs", "kargs",
+                 "node/bootcd", "extra args to pass the kernel on the Boot CD -- see GetBootMedium")
+define_accessors(current_module, Node, "NoHangcheck", "no-hangcheck",
+                 "node/bootcd", "disable hangcheck on the boot CD if set -- see GetBootMedium")
+
 # interface 
 # xxx - don't expose yet in api interface and slices dont know how to use that yet
 define_accessors(current_module, Interface, "Ifname", "ifname",