1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter
4 from PLC.Auth import Auth
5 from PLC.Methods.GetRoles import GetRoles
7 class AdmGetAllRoles(GetRoles):
9 Deprecated. See GetRoles.
11 Return all possible roles as a struct:
13 {'10': 'admin', '20': 'pi', '30': 'user', '40': 'tech'}
15 Note that because of XML-RPC marshalling limitations, the keys to
16 this struct are string representations of the integer role
25 roles_list = GetRoles.call(self, auth)
28 for role in roles_list:
30 roles_dict[str(role['role_id'])] = role['name']