X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FAdmGetAllRoles.py;h=2b8871450f23792d27a2a4b7bf2409a4b0948726;hb=865c7ad3dba34691309904e49cb5885e8d9cd5a1;hp=ea6c18fa0d0ced32f9ce6077071f107b2493dff4;hpb=a8e81964a7b22a0584667a0449604cccc895955a;p=plcapi.git diff --git a/PLC/Methods/AdmGetAllRoles.py b/PLC/Methods/AdmGetAllRoles.py index ea6c18f..2b88714 100644 --- a/PLC/Methods/AdmGetAllRoles.py +++ b/PLC/Methods/AdmGetAllRoles.py @@ -1,11 +1,13 @@ from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter -from PLC.Roles import Role, Roles -from PLC.Auth import PasswordAuth +from PLC.Auth import Auth +from PLC.Methods.GetRoles import GetRoles -class AdmGetAllRoles(Method): +class AdmGetAllRoles(GetRoles): """ + Deprecated. See GetRoles. + Return all possible roles as a struct: {'10': 'admin', '20': 'pi', '30': 'user', '40': 'tech'} @@ -15,12 +17,12 @@ class AdmGetAllRoles(Method): identifiers. """ - roles = ['admin', 'pi', 'user', 'tech'] - accepts = [PasswordAuth()] + status = "deprecated" + returns = dict def call(self, auth): - roles_list = Roles(self.api).values() + roles_list = GetRoles.call(self, auth) roles_dict = {} for role in roles_list: