AMI: Implement copy_image. (part 4, minor refactor for clarity)

This commit is contained in:
dreadpirateshawn 2014-10-01 07:59:02 -07:00
parent 635a0e0f64
commit 2dfd1799ae

View File

@ -604,9 +604,7 @@ class Ami(TaggedEC2Instance):
self.description = description if description else source_ami.description
self.launch_permission_groups = set()
self.autocreate_volume_and_snapshot()
def autocreate_volume_and_snapshot(self):
# AWS auto-creates these, we should reflect the same.
volume = ec2_backend.create_volume(15, "us-east-1a")
self.ebs_snapshot = ec2_backend.create_snapshot(volume.id, "Auto-created snapshot for AMI %s" % self.id)