844c4e68826797f7324767c6c73365190c6b9185
[util-vserver.git] / python / plcapi.py
1 #!/usr/bin/python
2
3 # PLCAPI access from nodes. Placeholder until we can do this for real
4 # using certificate- or session-based authentication. Node Manager
5 # should provide some localhost interface for retrieving the proper
6 # authentication parameters as well as the API server to use.
7 #
8 # Mark Huang <mlhuang@cs.princeton.edu>
9 # Copyright (C) 2006 The Trustees of Princeton University
10 #
11 # $Id: bwlimit.py,v 1.7 2006/03/01 18:54:38 mlhuang Exp $
12 #
13
14 import xmlrpclib
15
16 class PLCAPI(xmlrpclib.Server):
17     def __init__(self):
18         # XXX Only support anonymous calls for now
19         self.auth = {'AuthMethod': 'anonymous'}
20         xmlrpclib.Server.__init__(self,
21                                   uri = "https://www.planet-lab.org/PLCAPI/",
22                                   encoding = "utf-8")