From 0091ea1ec8bd2054bcd5926f2507f9285be52697 Mon Sep 17 00:00:00 2001 From: Faiyaz Ahmed Date: Mon, 5 Jan 2009 19:19:09 +0000 Subject: [PATCH] In line with util/config.py. Also, 'role' is deprecated in the PLC auth structure. --- util/remoteshell.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/util/remoteshell.py b/util/remoteshell.py index 64d75275..81fb3a7e 100644 --- a/util/remoteshell.py +++ b/util/remoteshell.py @@ -12,28 +12,19 @@ class RemoteShell: def __init__(self): self.servers = {} - def get_default_opts(self): - dict = {} - dict['Role'] = "user" - dict['Url'] = "https://www.planet-lab.org:443/PLCAPI/" - return dict - def call(self, name, pl_auth, *args): - auth_opts = self.get_default_opts().copy() - auth_opts.update(pl_auth) - url = auth_opts["Url"] - key = url + "#" + auth_opts["Username"] + key = pl_auth["Url"] + "#" + pl_auth["Username"] if not (key in self.servers): server = xmlrpclib.Server(url, verbose = 0, allow_none=True) - #server.AdmAuthCheck(auth_opts) - server.AuthCheck(auth_opts) + #server.AdmAuthCheck(pl_auth) + server.AuthCheck(pl_auth) self.servers[key] = server server = self.servers[key] - arglist = ["auth_opts"] + arglist = ["pl_auth"] for arg in args: arglist.append(repr(arg)) -- 2.45.2