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