Use the current time when launching an instance.

This commit is contained in:
Chris Henry 2015-01-18 15:53:59 -05:00
parent babb7450ec
commit 062256ada3
2 changed files with 2 additions and 1 deletions

View File

@ -299,6 +299,7 @@ class Instance(BotoInstance, TaggedEC2Resource):
self.subnet_id = kwargs.get("subnet_id")
self.key_name = kwargs.get("key_name")
self.source_dest_check = "true"
self.launch_time = datetime.now().strftime('%y-%m-%dT%H:%M:%S%z')
self.block_device_mapping = BlockDeviceMapping()
self.block_device_mapping['/dev/sda1'] = BlockDeviceType(volume_id=random_volume_id())

View File

@ -325,7 +325,7 @@ EC2_DESCRIBE_INSTANCES = """<DescribeInstancesResponse xmlns='http://ec2.amazona
<amiLaunchIndex>0</amiLaunchIndex>
<productCodes/>
<instanceType>{{ instance.instance_type }}</instanceType>
<launchTime>YYYY-MM-DDTHH:MM:SS+0000</launchTime>
<launchTime>{{ instance.launch_time }}</launchTime>
<placement>
<availabilityZone>us-west-2a</availabilityZone>
<groupName/>