get/set accessors should now work, e.g.:
[plcapi.git] / PLC / Accessors / Accessors_standard.py
1 # Thierry Parmentelat - INRIA
2 # $Id$
3
4 from PLC.Nodes import Node
5 from PLC.Interfaces import Interface
6 from PLC.Slices import Slice
7 from PLC.Ilinks import Ilink
8
9 from PLC.Accessors.Factory import all_roles, get_set_factory
10
11 methods=[]
12
13 # example : node architecture 
14 (GetNodeArch, SetNodeArch) = \
15     get_set_factory ( Node, "Arch", 'arch',  'node/config', 'architecture name', 
16                       tag_min_role_id=40, 
17                       get_roles=all_roles,
18                       set_roles=['admin', 'pi', 'tech'] )
19 methods += [ 'GetNodeArch', 'SetNodeArch' ]
20