take auth token param

This commit is contained in:
Sandy Walsh 2011-08-30 05:50:12 -07:00
parent fd7fe5206c
commit b96b4d039a
2 changed files with 7 additions and 4 deletions
novaclient

@ -32,7 +32,8 @@ class HTTPClient(httplib2.Http):
USER_AGENT = 'python-novaclient'
def __init__(self, user, apikey, projectid, auth_url, timeout=None):
def __init__(self, user, apikey, projectid, auth_url, timeout=None,
token=None):
super(HTTPClient, self).__init__(timeout=timeout)
self.user = user
self.apikey = apikey
@ -41,7 +42,7 @@ class HTTPClient(httplib2.Http):
self.version = 'v1.0'
self.management_url = None
self.auth_token = None
self.auth_token = token
# httplib2 overrides
self.force_exception_to_status_code = True

@ -25,7 +25,8 @@ class Client(object):
"""
# FIXME(jesse): project_id isn't required to autenticate
def __init__(self, username, api_key, project_id, auth_url, timeout=None):
def __init__(self, username, api_key, project_id, auth_url, timeout=None,
token=None):
self.flavors = flavors.FlavorManager(self)
self.images = images.ImageManager(self)
self.servers = servers.ServerManager(self)
@ -39,7 +40,8 @@ class Client(object):
api_key,
project_id,
auth_url,
timeout=timeout)
timeout=timeout,
token=None)
def authenticate(self):
"""