X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc.py;h=11d6e6edc2d611465c9215877f0e02efdf953089;hb=11af2608a703224fe72ff6596a36412f68f8f6d8;hp=0970eaa31909a8ff2bc09514e01c0eb0c99ab8bc;hpb=352fdcf0dc8991f1b0db2aabfc52e06ecf9ae99b;p=monitor.git diff --git a/plc.py b/plc.py index 0970eaa..11d6e6e 100644 --- a/plc.py +++ b/plc.py @@ -32,13 +32,16 @@ XMLRPC_SERVER="https://boot.planet-lab.org/PLCAPI/" auth = Auth() try: import monitorconfig - auth.auth = monitorconfig.API_AUTH + auth.auth = {'Username' : monitorconfig.API_AUTH_USER, + 'AuthMethod' : 'password', + 'AuthString' : monitorconfig.API_AUTH_PASSWORD} auth.server = monitorconfig.API_SERVER except: try: import auth auth.server = auth.plc except: + auth = Auth() auth.server = XMLRPC_SERVER api = xmlrpclib.Server(auth.server, verbose=False, allow_none=True) @@ -63,7 +66,7 @@ def getAPI(url): return xmlrpclib.Server(url, verbose=False, allow_none=True) def getAuthAPI(): - return PLC(monitorconfig.API_AUTH, monitorconfig.API_SERVER) + return PLC(auth.auth, auth.server) ''' Returns list of nodes in dbg as reported by PLC