X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FSliceUsersList.py;h=ffea537f0fbf76c3ec5121d97a95268e3bf66a88;hb=0fa905f9b5a075e509787a74c56f1f3ced669ec4;hp=70eadb20299e9e6573eed7bf8effe05d0b4947c3;hpb=77e4f177dfee85705c36298c3230b2e4a3e73467;p=plcapi.git diff --git a/PLC/Methods/SliceUsersList.py b/PLC/Methods/SliceUsersList.py index 70eadb2..ffea537 100644 --- a/PLC/Methods/SliceUsersList.py +++ b/PLC/Methods/SliceUsersList.py @@ -1,4 +1,3 @@ -# $Id$ from PLC.Method import Method from PLC.Parameter import Parameter, Mixed from PLC.Filter import Filter @@ -16,7 +15,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 +26,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