1 # $Id: GetPersonTags.py 14587 2009-07-19 13:18:50Z thierry $
2 # $URL: http://svn.planet-lab.org/svn/PLCAPI/tags/PLCAPI-4.3-27/PLC/Methods/GetPersonTags.py $
4 # Thierry Parmentelat - INRIA
8 from PLC.Faults import *
9 from PLC.Method import Method
10 from PLC.Parameter import Parameter, Mixed
11 from PLC.Filter import Filter
12 from PLC.Auth import Auth
14 from PLC.PersonTags import PersonTag, PersonTags
16 class GetPersonTags(Method):
18 Returns an array of structs containing details about
19 persons and related settings.
21 If person_tag_filter is specified and is an array of
22 person setting identifiers, only person settings matching
23 the filter will be returned. If return_fields is specified, only
24 the specified details will be returned.
27 roles = ['admin', 'pi', 'user', 'node']
31 Mixed([PersonTag.fields['person_tag_id']],
32 Parameter(int,"Person setting id"),
33 Filter(PersonTag.fields)),
34 Parameter([str], "List of fields to return", nullok = True)
37 returns = [PersonTag.fields]
40 def call(self, auth, person_tag_filter = None, return_fields = None):
42 person_tags = PersonTags(self.api, person_tag_filter, return_fields)