1 # Thierry Parmentelat - INRIA
5 # Shortcuts_site.py is the place where you can define your own tag accessors
6 # this will not be overwritten through rpm upgrades in a myplc-devel packaging
8 # methods denotes the set of methods (names) that get inserted into the API
9 # it is updated by define_accessors
13 from PLC.Nodes import Node
14 from PLC.Interfaces import Interface
15 from PLC.Slices import Slice
16 #from PLC.Ilinks import Ilink
18 from PLC.Accessors.Factory import define_accessors, all_roles, tech_roles
21 current_module = sys.modules[__name__]
23 #### example : attach vlan ids on interfaces
24 # The third argument expose_in_api is a boolean flag that tells whether this tag may be handled
25 # through the Add/Get/Update methods as a native field
27 #define_accessors(current_module, Interface, "Vlan", "vlan",
28 # "interface/general", "tag for setting VLAN id",
29 # get_roles=all_roles, set_roles=tech_roles)