X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FSliceUsersList.py;h=96269938920de39bc4bf63e500e60e18b3cff337;hb=8c952d8a400d444d40b8613f0db25f997162f214;hp=70eadb20299e9e6573eed7bf8effe05d0b4947c3;hpb=77e4f177dfee85705c36298c3230b2e4a3e73467;p=plcapi.git diff --git a/PLC/Methods/SliceUsersList.py b/PLC/Methods/SliceUsersList.py index 70eadb2..9626993 100644 --- a/PLC/Methods/SliceUsersList.py +++ b/PLC/Methods/SliceUsersList.py @@ -1,4 +1,5 @@ # $Id$ +# $URL$ from PLC.Method import Method from PLC.Parameter import Parameter, Mixed from PLC.Filter import Filter @@ -16,7 +17,7 @@ class SliceUsersList(GetSlices, GetPersons): Users may only query slices of which they are members. PIs may query any of the slices at their sites. Admins may query any - slice. If a slice that cannot be queried is specified details + slice. If a slice that cannot be queried is specified details about that slice will not be returned. """ @@ -27,20 +28,20 @@ class SliceUsersList(GetSlices, GetPersons): accepts = [ Auth(), Slice.fields['name'] - ] + ] returns = [Person.fields['email']] - + def call(self, auth, slice_name): - slice_filter = [slice_name] + slice_filter = [slice_name] slices = GetSlices.call(self, auth, slice_filter) - if not slices: + if not slices: return [] - slice = slices[0] - - persons = GetPersons.call(self, auth, slice['person_ids']) - person_emails = [person['email'] for person in persons] + slice = slices[0] + + persons = GetPersons.call(self, auth, slice['person_ids']) + person_emails = [person['email'] for person in persons] return person_emails