3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.Filter import Filter
6 from PLC.Auth import Auth
7 from PLC.Slices import Slice, Slices
8 from PLC.Persons import Person, Persons
9 from PLC.Methods.GetSlices import GetSlices
10 from PLC.Methods.GetPersons import GetPersons
12 class SliceUsersList(GetSlices, GetPersons):
14 Deprecated. Can be implemented with GetSlices and GetPersons.
16 List users that are members of the named slice.
18 Users may only query slices of which they are members. PIs may
19 query any of the slices at their sites. Admins may query any
20 slice. If a slice that cannot be queried is specified details
21 about that slice will not be returned.
26 roles = ['admin', 'pi', 'user']
33 returns = [Person.fields['email']]
36 def call(self, auth, slice_name):
38 slice_filter = [slice_name]
39 slices = GetSlices.call(self, auth, slice_filter)
44 persons = GetPersons.call(self, auth, slice['person_ids'])
45 person_emails = [person['email'] for person in persons]