from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Sites import Site, Sites
-from PLC.Auth import PasswordAuth
+from PLC.Auth import Auth
class AdmGetSiteNodes(Method):
"""
Deprecated. See GetSites.
- Return a dictionary containing a list of node_ids for each of the
- sites specified.
+ Return a struct containing an array of node_ids for each of the
+ sites specified. Note that the keys of the struct are strings, not
+ integers, because of XML-RPC marshalling limitations.
Admins may retrieve details about all nodes on a site by not specifying
site_id_or_name or by specifying an empty list. Users and
roles = ['admin', 'pi', 'user', 'tech']
accepts = [
- PasswordAuth(),
+ Auth(),
[Mixed(Site.fields['site_id'],
Site.fields['name'])],
]
- returns = { Site.fields['site_id']: Site.fields['node_ids'] }
+ returns = dict
def call(self, auth, site_id_or_name_list = None):
# Get site information
- sites = Sites(self.api, site_id_or_name_list).values()
+ sites = Sites(self.api, site_id_or_name_list)
if not sites:
raise PLCInvalidArgument, "No such site"