-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change implements batch actions on collections: ```python s3.Bucket('boto3').objects.delete() ``` It does the following: * Create a `CollectionFactory` class to generate subclasses of `CollectionManager` and `ResourceCollection`. * Update the `ResourceFactory` to use the new `CollectionFactory`. * Add a public `pages()` method to collections. This returns entire pages of resource instances and it used by `__iter__` as well. * Add batch actions as methods via the new `CollectionFactory`. * Add a `BatchAction` subclass of `Action` which does the following: 1. Get a page of results from the collection's operation 2. Build parameters for the batch action operation 3. Call the batch action operation 4. Repeat until no more pages * Makes some previously public members private on `Action` as these should never have been public. * Update documentation to include collection classes. * Add tests to cover the new functionality.
- Loading branch information
1 parent
8ea77b9
commit 30463ab
Showing
11 changed files
with
685 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.