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.Sites import Site, Sites
9 class GetSites(Method):
11 Returns an array of structs containing details about sites. If
12 site_filter is specified and is an array of site identifiers or
13 hostnames, or a struct of site attributes, only sites matching the
14 filter will be returned. If return_fields is specified, only the
15 specified details will be returned.
18 roles = ['admin', 'pi', 'user', 'tech', 'node', 'anonymous']
22 Mixed([Mixed(Site.fields['site_id'],
23 Site.fields['login_base'])],
24 Parameter(str,"login_base"),
25 Parameter(int,"site_id"),
27 Parameter([str], "List of fields to return", nullok = True)
30 returns = [Site.fields]
32 def call(self, auth, site_filter = None, return_fields = None):
33 return Sites(self.api, site_filter, return_fields)