From: Mark Huang Date: Wed, 1 Mar 2006 22:04:12 +0000 (+0000) Subject: - stub, only provides anonymous access to API. At some point, Node X-Git-Tag: after-util-vserver-0_30_208-revert~42 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=787fe623bc1d35321ee3cb805d47096272c81950;hp=7ac7a9a6c88f7ca183a1204ab9956f31db88f588;p=util-vserver.git - stub, only provides anonymous access to API. At some point, Node Manager should provide some localhost interface for retrieving the proper authentication parameters as well as the API server to use. --- diff --git a/python/plcapi.py b/python/plcapi.py new file mode 100644 index 0000000..844c4e6 --- /dev/null +++ b/python/plcapi.py @@ -0,0 +1,22 @@ +#!/usr/bin/python +# +# PLCAPI access from nodes. Placeholder until we can do this for real +# using certificate- or session-based authentication. Node Manager +# should provide some localhost interface for retrieving the proper +# authentication parameters as well as the API server to use. +# +# Mark Huang +# Copyright (C) 2006 The Trustees of Princeton University +# +# $Id: bwlimit.py,v 1.7 2006/03/01 18:54:38 mlhuang Exp $ +# + +import xmlrpclib + +class PLCAPI(xmlrpclib.Server): + def __init__(self): + # XXX Only support anonymous calls for now + self.auth = {'AuthMethod': 'anonymous'} + xmlrpclib.Server.__init__(self, + uri = "https://www.planet-lab.org/PLCAPI/", + encoding = "utf-8")