summaryrefslogtreecommitdiffstats
path: root/nova/context.py
diff options
context:
space:
mode:
authorDan Prince <dan.prince@rackspace.com>2011-09-10 13:56:54 -0400
committerDan Prince <dan.prince@rackspace.com>2011-09-10 13:56:54 -0400
commit9482275a60ab8caa546ec402f61c60b9f5e7e33f (patch)
treeeaede68bf30f50a3e8cea0d7e3f2e0b3481cd468 /nova/context.py
parent128294ab9f5c03426ecb2154c48ea98186256d5b (diff)
downloadnova-9482275a60ab8caa546ec402f61c60b9f5e7e33f.tar.gz
nova-9482275a60ab8caa546ec402f61c60b9f5e7e33f.tar.xz
nova-9482275a60ab8caa546ec402f61c60b9f5e7e33f.zip
Update GlanceClient, GlanceImageService, and Glance Xen plugin to work with
Glance keystone.
Diffstat (limited to 'nova/context.py')
-rw-r--r--nova/context.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/nova/context.py b/nova/context.py
index 5c22641a0..de5b791c4 100644
--- a/nova/context.py
+++ b/nova/context.py
@@ -32,7 +32,7 @@ class RequestContext(object):
def __init__(self, user_id, project_id, is_admin=None, read_deleted=False,
roles=None, remote_address=None, timestamp=None,
- request_id=None, auth_token=None):
+ request_id=None, auth_token=None, strategy='noauth'):
self.user_id = user_id
self.project_id = project_id
self.roles = roles or []
@@ -50,6 +50,7 @@ class RequestContext(object):
request_id = unicode(uuid.uuid4())
self.request_id = request_id
self.auth_token = auth_token
+ self.strategy = strategy
def to_dict(self):
return {'user_id': self.user_id,
@@ -60,7 +61,8 @@ class RequestContext(object):
'remote_address': self.remote_address,
'timestamp': utils.strtime(self.timestamp),
'request_id': self.request_id,
- 'auth_token': self.auth_token}
+ 'auth_token': self.auth_token,
+ 'strategy': self.strategy}
@classmethod
def from_dict(cls, values):
@@ -77,7 +79,8 @@ class RequestContext(object):
remote_address=self.remote_address,
timestamp=self.timestamp,
request_id=self.request_id,
- auth_token=self.auth_token)
+ auth_token=self.auth_token,
+ strategy=self.strategy)
def get_admin_context(read_deleted=False):