Merge branch 'master' of ssh://sapanb@git.planet-lab.org/git/plcapi
[plcapi.git] / PLC / Accessors / Accessors_standard.py
index 2c1e141..0867515 100644 (file)
@@ -25,8 +25,15 @@ current_module = sys.modules[__name__]
 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",
+                 "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