From 68d9ee1096413be71fe85a038c783c99bc89781b Mon Sep 17 00:00:00 2001 From: Vladimir Vitkov Date: Thu, 19 Jun 2014 17:55:05 +0300 Subject: [PATCH] Improve ami listing performance * no need to list all available ami's, just self owned should be enough --- bootstrapvz/providers/ec2/tasks/ami.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrapvz/providers/ec2/tasks/ami.py b/bootstrapvz/providers/ec2/tasks/ami.py index cb8d459..61ef26e 100644 --- a/bootstrapvz/providers/ec2/tasks/ami.py +++ b/bootstrapvz/providers/ec2/tasks/ami.py @@ -21,7 +21,7 @@ class AMIName(Task): ami_name = info.manifest.image['name'].format(**info.manifest_vars) ami_description = info.manifest.image['description'].format(**info.manifest_vars) - images = info._ec2['connection'].get_all_images() + images = info._ec2['connection'].get_all_images(owner=['self']) for image in images: if ami_name == image.name: msg = 'An image by the name {ami_name} already exists.'.format(ami_name=ami_name)