summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJohannes Erdfelt <johannes.erdfelt@rackspace.com>2011-09-12 20:48:43 +0000
committerJohannes Erdfelt <johannes.erdfelt@rackspace.com>2011-09-12 20:48:43 +0000
commit79ef79abf24f7b8c8d3c9b652285a69fee7e9d14 (patch)
treee98ac047eb52616eda118be617c4229dc4189f47 /nova/api
parent2351c06f50d4556e564a7b0abb1653805e661330 (diff)
parent68551bb375588470b41606f181c445192c18cdaa (diff)
Merge with trunk
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/auth.py1
-rw-r--r--nova/api/openstack/create_instance_helper.py3
-rw-r--r--nova/api/openstack/servers.py5
3 files changed, 5 insertions, 4 deletions
diff --git a/nova/api/auth.py b/nova/api/auth.py
index cd0d38b3f..f73cae01e 100644
--- a/nova/api/auth.py
+++ b/nova/api/auth.py
@@ -70,6 +70,7 @@ class KeystoneContext(wsgi.Middleware):
project_id,
roles=roles,
auth_token=auth_token,
+ strategy='keystone',
remote_address=remote_address)
req.environ['nova.context'] = ctx
diff --git a/nova/api/openstack/create_instance_helper.py b/nova/api/openstack/create_instance_helper.py
index 67e669c17..e27ddf78b 100644
--- a/nova/api/openstack/create_instance_helper.py
+++ b/nova/api/openstack/create_instance_helper.py
@@ -92,7 +92,8 @@ class CreateInstanceHelper(object):
if str(image_href).startswith(req.application_url):
image_href = image_href.split('/').pop()
try:
- image_service, image_id = nova.image.get_image_service(image_href)
+ image_service, image_id = nova.image.get_image_service(context,
+ image_href)
kernel_id, ramdisk_id = self._get_kernel_ramdisk_from_image(
req, image_service, image_id)
images = set([str(x['id']) for x in image_service.index(context)])
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index d084ac360..f5447edc5 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -334,9 +334,8 @@ class Controller(object):
LOG.exception(msg)
raise exc.HTTPBadRequest(explanation=msg)
try:
- # TODO(gundlach): pass reboot_type, support soft reboot in
- # virt driver
- self.compute_api.reboot(req.environ['nova.context'], id)
+ self.compute_api.reboot(req.environ['nova.context'], id,
+ reboot_type)
except Exception, e:
LOG.exception(_("Error in reboot %s"), e)
raise exc.HTTPUnprocessableEntity()