1 # $Id: GetSiteTags.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/GetSiteTags.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.SiteTags import SiteTag, SiteTags
15 from PLC.Sites import Site, Sites
17 class GetSiteTags(Method):
19 Returns an array of structs containing details about
20 sites and related settings.
22 If site_tag_filter is specified and is an array of
23 site setting identifiers, only site settings matching
24 the filter will be returned. If return_fields is specified, only
25 the specified details will be returned.
28 roles = ['admin', 'pi', 'user', 'node']
32 Mixed([SiteTag.fields['site_tag_id']],
33 Parameter(int,"Site setting id"),
34 Filter(SiteTag.fields)),
35 Parameter([str], "List of fields to return", nullok = True)
38 returns = [SiteTag.fields]
41 def call(self, auth, site_tag_filter = None, return_fields = None):
43 site_tags = SiteTags(self.api, site_tag_filter, return_fields)