get rid of svn keywords once and for good
[plcapi.git] / PLC / Methods / GetKeyTypes.py
1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.KeyTypes import KeyType, KeyTypes
5 from PLC.Auth import Auth
6
7 class GetKeyTypes(Method):
8     """
9     Returns an array of all valid key types.
10     """
11
12     roles = ['admin', 'pi', 'user', 'tech', 'node']
13
14     accepts = [
15         Auth()
16         ]
17
18     returns = [KeyType.fields['key_type']]
19
20
21     def call(self, auth):
22         return [key_type['key_type'] for key_type in KeyTypes(self.api)]