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