summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-09-07 20:18:27 +0000
committerGerrit Code Review <review@openstack.org>2012-09-07 20:18:27 +0000
commit6ead0fbb5a987f1562c2cfee98248994870c5ce3 (patch)
treeeb2e1a4456ddc1abd610fed34e41758b9b229c85
parent39b757fec2cd3f90831846e95a887ccc341f3535 (diff)
parenta766d817218edcbb35c477382d5839f53c1f9570 (diff)
downloadnova-6ead0fbb5a987f1562c2cfee98248994870c5ce3.tar.gz
nova-6ead0fbb5a987f1562c2cfee98248994870c5ce3.tar.xz
nova-6ead0fbb5a987f1562c2cfee98248994870c5ce3.zip
Merge "Fix EC2 cinder volume creation as an admin user."
-rw-r--r--nova/api/ec2/cloud.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index 45c22b45d..14aa39438 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -722,10 +722,11 @@ class CloudController(object):
v['availabilityZone'] = volume['availability_zone']
v['createTime'] = volume['created_at']
if context.is_admin:
+ # NOTE(dprince): project_id and host_id are unset w/ Cinder
v['status'] = '%s (%s, %s, %s, %s)' % (
volume['status'],
- volume['project_id'],
- volume['host'],
+ volume.get('project_id', ''),
+ volume.get('host', ''),
instance_data,
volume['mountpoint'])
if volume['attach_status'] == 'attached':