2 # Thierry Parmentelat - INRIA
4 # Accessors_site.py is the place where you can define your own local tag accessors
5 # this will not be overwritten through rpm upgrades
7 # Now that Sites are taggable too, the name may be confusing, think of is as
10 # methods denotes the set of methods (names) that get inserted into the API
11 # it is updated by define_accessors
15 from PLC.Nodes import Node
16 from PLC.Interfaces import Interface
17 from PLC.Slices import Slice
18 from PLC.Sites import Site
19 from PLC.Persons import Person
20 #from PLC.Ilinks import Ilink
22 from PLC.Accessors.Factory import define_accessors, all_roles, tech_roles
25 current_module = sys.modules[__name__]
27 #### example : attach vlan ids on interfaces
28 # The third argument expose_in_api is a boolean flag that tells whether this tag may be handled
29 # through the Add/Get/Update methods as a native field
31 #define_accessors(current_module, Interface, "Vlan", "vlan",
32 # "interface/general", "tag for setting VLAN id",
33 # get_roles=all_roles, set_roles=tech_roles)