reconcile accessors and db-config tags scripts
[plcapi.git] / PLC / Accessors / Accessors_standard.py
index 1e28b87..a5f42d9 100644 (file)
@@ -5,16 +5,20 @@
 from PLC.Nodes import Node
 from PLC.Interfaces import Interface
 from PLC.Slices import Slice
+from PLC.Slices import Slice
+from PLC.Sites import Site
+from PLC.Persons import Person
 #from PLC.Ilinks import Ilink
 
-from PLC.Accessors.Factory import define_accessors, all_roles, tech_roles
+from PLC.Accessors.Factory import define_accessors, admin_roles, all_roles, tech_roles
 
 import sys
 current_module = sys.modules[__name__]
 
 # NOTE.
-# most of these tag types are defined in MyPLC/db-config, so any details here in the 
-# description/category area is unlikely to make it into the database
+# The 'Get' and 'Set' accessors defined here automagically create the corresponding TagType in the database
+# for safety, some crucial tags are forced to be created at plc startup time, through the db-config.d mechanism
+# You might wish to keep this roughly in sync with db-config.d/011-standard_tags
 #
 
 # 
@@ -44,14 +48,16 @@ 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 
+# Ditto for the GetNodeFlavour method
 define_accessors(current_module, Node, "Arch", "arch",  
                  "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/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, Node, "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 deployment (alpha, beta, ...)
 define_accessors(current_module, Node, "Deployment", "deployment",
                  "node/operation", 'typically "alpha", "beta", or "production"',
@@ -88,3 +94,7 @@ define_accessors(current_module, Interface, "Driver", "driver",
 define_accessors(current_module, Interface, "Alias", "alias", 
                  "interface/config", "interface alias",
                  get_roles=all_roles, set_roles=tech_roles)
+define_accessors(current_module, Interface, "Backdoor", "backdoor",
+                 "interface/hidden", "For testing new settings",
+                 get_roles=all_roles, set_roles=admin_roles)
+