added authenticate()
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Fri, 14 Sep 2012 15:36:20 +0000 (11:36 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Fri, 14 Sep 2012 15:36:20 +0000 (11:36 -0400)
PLC/NovaShell.py

index ca07fdb..68940ad 100644 (file)
@@ -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()