fix bugs with respect to recent Deployment model changes
diff --git a/planetstack/openstack/client.py b/planetstack/openstack/client.py
index 162e506..af91387 100644
--- a/planetstack/openstack/client.py
+++ b/planetstack/openstack/client.py
@@ -42,7 +42,7 @@
 
 class Client:
     def __init__(self, username=None, password=None, tenant=None, url=None, token=None, endpoint=None, deployment=None, admin=True, *args, **kwds):
-        
+       
         self.has_openstack = has_openstack
         self.url = deployment.auth_url
         if admin:
@@ -193,7 +193,7 @@
         self.keystone_db = KeystoneDB()
         self.glance = GlanceClient(*args, **kwds)
         
-        self.glanceclient = GlanceClientNew('1', endpoint='http://%s:9292' % hostname, token=token.id)
+        self.glanceclient = GlanceClientNew('1', endpoint='http://%s:9292' % hostname, token=token.id, **kwds)
         self.nova = NovaClient(*args, **kwds)
         self.nova_db = NovaDB(*args, **kwds)
         self.quantum = QuantumClient(*args, **kwds)
diff --git a/planetstack/openstack/driver.py b/planetstack/openstack/driver.py
index 8ebea68..9183daf 100644
--- a/planetstack/openstack/driver.py
+++ b/planetstack/openstack/driver.py
@@ -1,6 +1,7 @@
 import commands
 import hashlib
 from planetstack.config import Config
+from core.models import Deployment
 
 try:
     from openstack.client import OpenStackClient
@@ -12,19 +13,14 @@
 
 class OpenStackDriver:
 
-    def __init__(self, config = None, client=None, deployment=None):
+    def __init__(self, config = None, client=None):
         if config:
             self.config = Config(config)
         else:
             self.config = Config()
 
-        self.admin_client = OpenStackClient(deployment=deployment)
-        self.admin_user = self.admin_client.keystone.users.find(name=self.admin_client.keystone.username)
-
         if client:
             self.shell = client
-        else:
-            self.shell = OpenStackClient(deployment=deployment)
 
         self.enabled = manager_enabled
         self.has_openstack = has_openstack
@@ -38,12 +34,13 @@
         else:
             client = OpenStackClient(tenant=tenant, deployment=deployment)
 
-        driver = OpenStackDriver(client=client, deployment=deployment)
+        driver = OpenStackDriver(client=client)
         return driver
 
     def admin_driver(self, tenant=None, deployment=None):
+        deployment = Deployment.objects.get(name=deployment)
         client = OpenStackClient(tenant=tenant, deployment=deployment)
-        driver = OpenStackDriver(client=client, deployment=deployment)
+        driver = OpenStackDriver(client=client)
         return driver    
 
     def create_role(self, name):