svn keywords
[plcapi.git] / PLC / Accessors / Accessors_site.py
1 # Thierry Parmentelat - INRIA
2 # $Id$
3 # $URL$
4 #
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
7 #
8 # methods denotes the set of methods (names) that get inserted into the API
9 # it is updated by define_accessors
10
11 methods=[]
12
13 from PLC.Nodes import Node
14 from PLC.Interfaces import Interface
15 from PLC.Slices import Slice
16 #from PLC.Ilinks import Ilink
17
18 from PLC.Accessors.Factory import define_accessors, all_roles, tech_roles
19
20 import sys
21 current_module = sys.modules[__name__]
22
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
26
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)