[Planetlab-users] Additional anonymous admin API functions
Mark Huang
mlhuang at CS.Princeton.EDU
Fri Sep 23 10:29:12 EDT 2005
Dear Users,
I have added additional anonymous functions to the PLC API that should
make it easier to retrieve information about nodes, node groups, and sites:
http://www.planet-lab.org/doc/api/plc_api/specification.php
In particular, it should now be possible to deprecate the use of
all_hosts.php, beta_hosts.php, etc_hosts.php, etc. in your future
scripts. For instance (from the Python shell):
# Get a list of beta node structs
import xmlrpclib
api = xmlrpclib.Server('https://www.planet-lab.org/PLCAPI/')
auth = { 'AuthMethod': 'anonymous' }
nodegroups = api.AnonAdmGetNodeGroups(auth)
beta = filter(lambda n: n['name'] == 'Beta', nodegroups)[0]
betanodes = api.AnonAdmGetNodes(auth, api.AnonAdmGetNodeGroupNodes(auth,
beta['nodegroup_id']))
Doing the same with Frontier in Perl, or curl/grep in bash, I leave as
an exercise to the reader.
I plan on adding additional anonymous functions, as well as query
functions, in an attempt to eliminate more of the website's direct use
of the database.
--Mark
More information about the Users
mailing list