svn keywords
[plcapi.git] / PLC / Methods / GetRoles.py
1 # $Id$
2 # $URL$
3 from PLC.Faults import *
4 from PLC.Method import Method
5 from PLC.Parameter import Parameter, Mixed
6 from PLC.Roles import Role, Roles
7 from PLC.Auth import Auth
8
9 class GetRoles(Method):
10     """
11     Get an array of structs containing details about all roles.
12     """
13
14     roles = ['admin', 'pi', 'user', 'tech', 'node']
15
16     accepts = [
17         Auth()
18         ]
19
20     returns = [Role.fields]
21     
22     def call(self, auth):
23         return Roles(self.api)