diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-08-09 16:49:21 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-08-09 16:49:21 +0000 |
| commit | 13ac52d2c21d6e0df7c896b25c91bd7a53b1871c (patch) | |
| tree | e964940abb6e14b8e363daef06baae36fbbd3549 /nova/api | |
| parent | f1c0a84be4dc1be15cb2b2c2676b9243fd24bd3d (diff) | |
| parent | fe264ba158e8dc7f8b249bc6619d7001e7819c5d (diff) | |
Merge "Fix traceback when detaching volumes via EC2"
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/ec2/cloud.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 5e85cd88a..22eb78b63 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -795,14 +795,14 @@ class CloudController(object): volume = self.volume_api.get(context, volume_id) try: - instance = self.compute_api.detach_volume(context, - volume_id=volume_id) + self.compute_api.detach_volume(context, volume_id=volume_id) except exception.InvalidVolume: raise exception.EC2APIError(_('Detach Volume Failed.')) return {'attachTime': volume['attach_time'], 'device': volume['mountpoint'], - 'instanceId': ec2utils.id_to_ec2_inst_id(instance['uuid']), + 'instanceId': ec2utils.id_to_ec2_inst_id( + volume['instance_uuid']), 'requestId': context.request_id, 'status': volume['attach_status'], 'volumeId': ec2utils.id_to_ec2_vol_id(volume_id)} |
