-# slice vref
-# xxx - don't expose yet in api interface and slices dont know how to use that yet
-define_accessors(current_module, Slice, "Vref", "vref",
- "slice/config", "vserver reference image type",
- get_roles=all_roles, set_roles=["admin"], expose_in_api=True)
-
-
-# node architecture
-define_accessors(current_module, Node, "Arch", "arch",
- "node/config", "architecture name",
- 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",
- get_roles=all_roles, set_roles=["admin"], expose_in_api=True)
+# These following accessors are mostly of interest for implementing the
+# The GetSliceFamily and GetNodeFlavour methods take into account various tags,
+# esp. arch, fcdistro, pldistro, vref (for slices) and deployment (for nodes)
+# as well as the global PLC_FLAVOUR config category
+# in order to return all configuration details for a given node or slice
+
+### slice vref
+define_accessors(current_module, Slice, "Vref", "vref",
+ "slice/config", "vserver reference image name",
+ set_roles=["admin","pi","user","node"], expose_in_api=True)
+# this contains the actual script text
+# if set, it supersedes 'initscript'
+define_accessors(current_module, Slice, "InitscriptCode","initscript_code",
+ "slice/usertools", "Slice initialization script code",
+ set_roles=["admin","pi","user"], expose_in_api=True)
+# this may contain a *name* that refers to the GetInitScripts
+# it was initially designed to share scripts among slices
+define_accessors(current_module, Slice, "Initscript","initscript",
+ "slice/usertools", "Slice initialization script name",
+ set_roles=["admin","pi","user"], expose_in_api=True)
+
+# BootManager might need to set any of these 3, so 'node' needs to be in set_roles
+# needs 'pi' and 'tech' for managing their node
+# needs 'user' for managing their slices
+# needs 'admin' so the Set method is accessible
+define_accessors(current_module, [Slice,Node], "Arch", "arch",
+ "node/slice/config", "node arch or slivers arch",
+ set_roles=all_roles, expose_in_api=True)
+define_accessors(current_module, [Slice,Node], "Pldistro", "pldistro",
+ "node/slice/config/sfa", "PlanetLab distribution to use for node or slivers",
+ set_roles=all_roles, expose_in_api=True)
+# fc of course historically was for fedora core
+define_accessors(current_module, [Slice,Node], "Fcdistro", "fcdistro",
+ "node/slice/config", "Linux distribution to use for node or slivers",
+ set_roles=all_roles, expose_in_api=True)
+
+# the virtualization model to use - this is only used by the bootmanager for
+# picking the right options e.g. prior to reinstalling
+# see PLC_FLAVOUR_VIRT_MAP to see how the default gets computed
+define_accessors(current_module, Node, "Virt", "virt",
+ "node/operation", 'typically "vs" or "lxc"',
+ set_roles=all_roles, expose_in_api=True)