define tags exposed to the API in the Accessors area
[plcapi.git] / PLC / Accessors / Accessors_site.py
index 1816117..3a78e82 100644 (file)
@@ -12,7 +12,7 @@ methods=[]
 from PLC.Nodes import Node
 from PLC.Interfaces import Interface
 from PLC.Slices import Slice
-from PLC.Ilinks import Ilink
+#from PLC.Ilinks import Ilink
 
 from PLC.Accessors.Factory import define_accessors, all_roles, tech_roles
 
@@ -20,5 +20,9 @@ import sys
 current_module = sys.modules[__name__]
 
 #### example : attach vlan ids on interfaces
-###define_accessors(current_module, Interface, "Vlan", "vlan","interface/general", "tag for setting VLAN id",
-###                 get_roles=all_roles, set_roles=tech_roles)
+# The third argument expose_in_api is a boolean flag that tells whether this tag may be handled 
+#   through the Add/Get/Update methods as a native field
+# 
+#define_accessors(current_module, Interface, "Vlan", "vlan",
+#                  "interface/general", "tag for setting VLAN id",
+#                  get_roles=all_roles, set_roles=tech_roles)