From ee2dd66c9c2350d9c4aa4ae535daed7e8d72dfb3 Mon Sep 17 00:00:00 2001 From: Arathi Date: Wed, 26 Sep 2012 11:04:20 +0530 Subject: 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 --- nova/api/ec2/cloud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/api') 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, } -- cgit