contrib/automation/hgautomation/aws.py
changeset 42275 730edbd836d8
parent 42064 0e9066db5e44
child 42276 fcb97cb91ff8
equal deleted inserted replaced
42274:8a0e03f7baf4 42275:730edbd836d8
   488     ec2resource = c.ec2resource
   488     ec2resource = c.ec2resource
   489     iamresource = c.iamresource
   489     iamresource = c.iamresource
   490 
   490 
   491     terminate_ec2_instances(ec2resource, prefix=prefix)
   491     terminate_ec2_instances(ec2resource, prefix=prefix)
   492 
   492 
   493     for image in ec2resource.images.all():
   493     for image in ec2resource.images.filter(Owners=['self']):
   494         if image.name.startswith(prefix):
   494         if image.name.startswith(prefix):
   495             remove_ami(ec2resource, image)
   495             remove_ami(ec2resource, image)
   496 
   496 
   497     for group in ec2resource.security_groups.all():
   497     for group in ec2resource.security_groups.all():
   498         if group.group_name.startswith(prefix):
   498         if group.group_name.startswith(prefix):