summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorArathi <arathi_darshanam@persistent.co.in>2012-09-26 11:04:20 +0530
committerArathi <arathi_darshanam@persistent.co.in>2012-09-26 14:22:16 +0530
commitee2dd66c9c2350d9c4aa4ae535daed7e8d72dfb3 (patch)
treed6453952386b02f28454f6769ab8650d2aba9266 /nova/api
parentc367fa5e4a5e4712bde9fc319ae6c2f4f2add606 (diff)
Updated code to update attach_time of a volume while detaching
While detaching volume from an instance, attach_time of the volume is not updated. This task updates volume['attach_time'] to NONE at detach_volume. Also modified the default value of XML attribute volume['attach_time'] '-' to ''(a 0 length string) to maintain consistency with existing code. Fixes bug: 1056122 Change-Id: If56ceda6caab80fb803fcf194ed1dfb18808ec3a
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/cloud.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index 5cb07eeac..7c742b034 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -978,7 +978,7 @@ class CloudController(object):
# TODO(yamahata): volume attach time
ebs = {'volumeId': volume_id,
'deleteOnTermination': bdm['delete_on_termination'],
- 'attachTime': vol['attach_time'] or '-',
+ 'attachTime': vol['attach_time'] or '',
'status': vol['status'], }
res = {'deviceName': bdm['device_name'],
'ebs': ebs, }