2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.Filter import Filter
5 from PLC.Auth import Auth
6 from PLC.Sites import Site, Sites
8 class GetSites(Method):
10 Returns an array of structs containing details about sites. If
11 site_filter is specified and is an array of site identifiers or
12 hostnames, or a struct of site attributes, only sites matching the
13 filter will be returned. If return_fields is specified, only the
14 specified details will be returned.
17 roles = ['admin', 'pi', 'user', 'tech', 'node', 'anonymous']
21 Mixed([Mixed(Site.fields['site_id'],
22 Site.fields['login_base'])],
23 Parameter(str,"login_base"),
24 Parameter(int,"site_id"),
26 Parameter([str], "List of fields to return", nullok = True)
29 returns = [Site.fields]
31 def call(self, auth, site_filter = None, return_fields = None):
32 return Sites(self.api, site_filter, return_fields)