summaryrefslogtreecommitdiffstats
path: root/nova/cloudpipe
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@yahoo.com>2010-10-01 05:57:17 -0700
committerVishvananda Ishaya <vishvananda@yahoo.com>2010-10-01 05:57:17 -0700
commit5e3da5864825a12da5a1ea1102a6efb6cebe204b (patch)
tree3bf2321dd436f6abb0c03e6aeee932f08ae8b018 /nova/cloudpipe
parent4d13a8554459638387d772a23fffe6aaaab3348d (diff)
downloadnova-5e3da5864825a12da5a1ea1102a6efb6cebe204b.tar.gz
nova-5e3da5864825a12da5a1ea1102a6efb6cebe204b.tar.xz
nova-5e3da5864825a12da5a1ea1102a6efb6cebe204b.zip
Fix the deprecation warnings for passing no context.
Moved RequestContext out of nova.api, because it is used by everything Context is passed through the queue. Added some helper methods for converting to admin context. Added a few more fields to request context.
Diffstat (limited to 'nova/cloudpipe')
-rw-r--r--nova/cloudpipe/pipelib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/cloudpipe/pipelib.py b/nova/cloudpipe/pipelib.py
index 706a175d9..4fc2c85cb 100644
--- a/nova/cloudpipe/pipelib.py
+++ b/nova/cloudpipe/pipelib.py
@@ -28,13 +28,13 @@ import os
import tempfile
import zipfile
+from nova import context
from nova import exception
from nova import flags
from nova import utils
from nova.auth import manager
# TODO(eday): Eventually changes these to something not ec2-specific
from nova.api.ec2 import cloud
-from nova.api.ec2 import context
FLAGS = flags.FLAGS
@@ -62,7 +62,7 @@ class CloudPipe(object):
key_name = self.setup_key_pair(project.project_manager_id, project_id)
zippy = open(zippath, "r")
- context = context.APIRequestContext(user=project.project_manager, project=project)
+ context = context.RequestContext(user=project.project_manager, project=project)
reservation = self.controller.run_instances(context,
# run instances expects encoded userdata, it is decoded in the get_metadata_call