e89a2ad413c24982e17f4bb75979f5a5797baafe
[plcapi.git] / PLC / Shortcuts / Shortcuts_site.py.in
1 # Thierry Parmentelat - INRIA
2 # $Id$
3 #
4
5 # Shortcuts_site.py is the place where you can define your own tag accessors
6 #
7 # methods denotes the set of methods (names) that get inserted into the API
8 #
9
10 methods=[]
11
12 from PLC.Nodes import Node
13 from PLC.Interfaces import Interface
14 from PLC.Slices import Slice
15 from PLC.Ilinks import Ilink
16
17 from PLC.Shortcuts.Factory import all_roles, get_set_factory
18
19 #### example : attach vlan ids on interfaces
20 ###(GetInterfaceVlan, SetInterfaceVlan) = \
21 ###    get_set_factory ( Interface, "Vlan", "vlan","interface/general", "tag for setting VLAN id",
22 ###                      get_roles=all_roles,
23 ###                      set_roles=['admin', 'pi', 'tech'] )
24 ###methods += [ 'GetInterfaceVlan', 'SetInterfaceVlan' ]