summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Gordon <jogo@cloudscaling.com>2013-03-04 15:39:48 -0800
committerJoe Gordon <jogo@cloudscaling.com>2013-03-04 15:39:48 -0800
commitad0d184e9df7a4920b165d02cfde186e8e8b27f7 (patch)
tree07c2d753b82a4294eb94ca4cc577afb32480f8a8
parenta246cb90d229aea5cf70d886ad76061d5ad59010 (diff)
downloadnova-ad0d184e9df7a4920b165d02cfde186e8e8b27f7.tar.gz
nova-ad0d184e9df7a4920b165d02cfde186e8e8b27f7.tar.xz
nova-ad0d184e9df7a4920b165d02cfde186e8e8b27f7.zip
Remove completed FIXME.
block_device_mapping doesn't need elevated context anymore. Change-Id: Iee23320be10604256db479c13ee405f601cbfd42
-rw-r--r--nova/compute/api.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index bd2bafe33..6c8c4b480 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -791,21 +791,18 @@ class API(base.Base):
def _populate_instance_for_bdm(self, context, instance, instance_type,
image, block_device_mapping):
"""Populate instance block device mapping information."""
- # FIXME(comstud): Why do the block_device_mapping DB calls
- # require elevated context?
- elevated = context.elevated()
instance_uuid = instance['uuid']
image_properties = image.get('properties', {})
mappings = image_properties.get('mappings', [])
if mappings:
- self._update_image_block_device_mapping(elevated,
+ self._update_image_block_device_mapping(context,
instance_type, instance_uuid, mappings)
image_bdm = image_properties.get('block_device_mapping', [])
for mapping in (image_bdm, block_device_mapping):
if not mapping:
continue
- self._update_block_device_mapping(elevated,
+ self._update_block_device_mapping(context,
instance_type, instance_uuid, mapping)
def _populate_instance_shutdown_terminate(self, instance, image,
@@ -1772,7 +1769,7 @@ class API(base.Base):
"""
Remove old image properties that we're storing as instance
system metadata. These properties start with 'image_'.
- Then add the properites for the new image.
+ Then add the properties for the new image.
"""
# FIXME(comstud): There's a race condition here in that