def get_all_images()

in footmark/ecs/connection.py [0:0]


    def get_all_images(self, image_id=None, image_name=None, 
                           snapshot_id=None, filters=None):
            """
            Get all Volumes associated with the current credentials.

            :type image_id: dict
            :param image_id: Optional  image id.  If this is present,
                             only the image associated with these
                             image id will be returned.
        
            :type image_name: dict
            :param image_name: Optional image name.  If this is present,
                               only the image associated with these 
                               image name will be returned.

            :type snapshot_id: list
            :param snapshot_id: Optional snapshot id.  If this list is
                                present, only the image associated with
                                these snapshot id will be returned.

            :type filters: dict
            :param filters: Optional filters that can be used to limit
                            the results returned.  Filters are provided
                            in the form of a dictionary consisting of
                            filter names as the key and filter values
                            as the value.  The set of allowable filter
                            names/values is dependent on the request
                            being performed.  Check the ECS API guide
                            for details.

            :rtype: list of Volume
            :return: The requested Volume objects
            """
            params = {}
            result = []
            changed = False
            if image_id:
                self.build_list_params(params, image_id, 'ImageId')
            if image_name:
                self.build_list_params(params, image_name, 'ImageName')
            if snapshot_id:
                self.build_list_params(params, snapshot_id, 'SnapshotId')
            if filters:
                self.build_filter_params(params, filters)
            result = self.get_list('DescribeImages', params, ['Images', Image])
            if result:
                changed = True;
            else:
                while changed == False:
                    time.sleep(20);
                    result = self.get_list('DescribeImages', params, ['Images', Image])
                    if result:
                        changed = True;
                        break                
                    
            return result;