From: Tony Mack <tmack@paris.CS.Princeton.EDU> Date: Fri, 14 Sep 2012 15:36:20 +0000 (-0400) Subject: added authenticate() X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=7d08fc867f025ab992c481c4b151ce9004023449;p=plcapi.git added authenticate() --- diff --git a/PLC/NovaShell.py b/PLC/NovaShell.py index ca07fdb1..68940ad0 100644 --- a/PLC/NovaShell.py +++ b/PLC/NovaShell.py @@ -22,7 +22,7 @@ def parse_novarc(filename): class Client: - def __init__(self, username=None, password=None, tenant=None, url=None, config=None): + def __init__(self, username=None, password=None, tenant=None, url=None, config=None, *args, **kwds): if config: config = Config(config) else: @@ -92,8 +92,11 @@ class NovaShell: This class can receive all nova calls to the underlying testbed """ - def __init__ ( self, config=None) : + def __init__ ( self, *args, **kwds) : # instantiate managers - self.keystone = KeystoneClient(config=config) - self.glance = GlanceClient(config=config) - self.nova = NovaClient(config=config) + self.keystone = KeystoneClient(*args, **kwds) + self.glance = GlanceClient(*args, **kwds) + self.nova = NovaClient(*args, **kwds) + + def authenticate(self): + return self.keystone.authenticate()