Commit Graph

28 Commits

Author SHA1 Message Date
Peter Lithammer
b7cf2d4478
ecr: Fix "imageDigest" value in ecr.list_images() response (#3436) 2020-11-05 14:10:23 +00:00
jweite
49d92861c0
Iam cloudformation update, singificant cloudformation refactoring (#3218)
* IAM User Cloudformation Enhancements: update, delete, getatt.

* AWS::IAM::Policy Support

* Added unit tests for AWS:IAM:Policy for roles and groups.  Fixed bug related to groups.

* AWS:IAM:AccessKey CloudFormation support.

* Refactor of CloudFormation parsing.py methods to simplify and standardize how they call to the models.  Adjusted some models accordingly.

* Further model CloudFormation support changes to align with revised CloudFormation logic.  Mostly avoidance of getting resoure name from properties.

* Support for Kinesis Stream RetentionPeriodHours param.

* Kinesis Stream Cloudformation Tag Support.

* Added omitted 'region' param to boto3.client() calls in new tests.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-08-27 10:11:47 +01:00
Adam Richie-Halford
9a9a1d8413
Decentralize cloudformation naming responsibilities (#3201)
* #3127 - Decentralize CF naming responsibilities

* Decentralize CloudFormation naming responsibilities

* Update URLs in cloudformation_resource_type functions

* Fix flake8 errors

* Black formatting

* Add a bunch of imports to populate CloudFormationModel.__subclasses__

* Add noqa to s3 models import statement in cloudformation/parsing.py

* Black formatting

* Remove debugging print statement

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-08-01 15:23:36 +01:00
Asher Foa
374b623e1d Fix some 'DeprecationWarning: invalid escape sequence' warnings and use str.format for string interpolation.
I am seeing a lot of deperecation warnings when I use moto for my tests (running under pytest), so I figured I'll clean up some of them.
2020-03-12 13:50:59 -07:00
Dick Marinus
28af7412f8 Change RESTError to JsonRESTError for ImageNotFoundException, update test to expect ImageNotFoundException 2020-03-08 20:56:21 +01:00
Asher Foa
96e5b1993d Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
Chih-Hsuan Yen
77bc97c8da
Fix ECR models for Python 3.8
Before this fix, using moto.ecr with Python 3.8 results in the
following error:

RuntimeError: dictionary keys changed during iteration
2019-10-27 16:58:03 +08:00
Juan Martinez
9a26c92e72 Delete ECR image when it has no tags
This is a bug fix to my initial work when implementing
batch_delete_image. Deleting the last tag for a given image should
delete the image from the backend.

I also cleaned up the tests previously-added in the initial
implementation.
2019-06-17 13:41:35 -04:00
Juan Martinez
ed93821621 Set ECR imagePushedAt to current date and time (#2229) 2019-06-06 13:34:10 +01:00
Juan Martinez
664b27d8e7 Implement ECR batch_delete_image (#2225)
This implements the endpoint in spulec #2224
2019-05-30 18:16:19 +01:00
William Richard
935039d684
ECR now uses api.ecr as its endpoint.
This changed in botocore 1.12.85. See b5fa8a5139

This fixes https://github.com/spulec/moto/issues/2035
2019-01-25 14:47:23 -05:00
Stephan Huber
88596518f5 Merge remote-tracking branch 'upstream/master' 2018-09-12 11:48:19 +02:00
Clément Huyghebaert
e32a640861 Fix for spulec/moto#1698 - ECR list_images missing RepositoryNotFoundException 2018-06-25 12:34:10 -04:00
Stephan Huber
56ff66394d updated to make sure that tests still run correctly 2018-06-14 09:56:53 +02:00
Stephan Huber
ea3366be35 do not allow None as value of image_tags 2018-06-14 09:53:11 +02:00
Stephan Huber
cc799b55da fixed spulec/moto#1684 and fixed spulec/moto#1685 2018-06-14 09:07:09 +02:00
Stephan Huber
3a355f126c first steps undertaken to fix spulec/moto#1684 and spulec/moto#1685 2018-06-13 16:14:18 +02:00
Stephan Huber
ecbaf76413 Fixes #1624 2018-05-09 09:20:48 +02:00
Mike Bjerkness
b855fee2e4 Add batch_get_image support for ECR (#1406)
* Add batch_get_image for ECR

* Add tests for batch_get_image

* Add tests for batch_get_image

* Undo local commits

* Undo local commits

* Adding object representation for batch_get_image

* Update responses. Add a couple more tests.
2017-12-30 18:39:23 -08:00
Hugo Lopes Tavares
e4da4f6cd5 Add more error handling to the ECR backend
The error messages were copied from `botocore`.
New exceptions: RepositoryNotFoundException & ImageNotFoundException.
2017-08-10 19:54:10 -04:00
William Richard
aeefc8056d
Boto actually returns a base64 encoded string of <user>:<password>
Fix the mock to do the same thing
2017-07-26 12:03:20 -04:00
William Richard
025e975e44
Add ecr get_authorization_token response and tests 2017-07-25 17:54:05 -04:00
William Richard
3f20ad2c13
Support filtering by image id or image tag when describing ecr images 2017-06-20 16:22:34 -04:00
William Richard
b67e10d5c9
Make sure the repository response_object is json serializable with images
If images had been pushed to a repository, they would be included in the
response object, and the json encoder could not serialize the Image class.

Since they are not included in the boto response, I just deleted the images
field from the response object for Repositories.

I also found a duplicate test in the ecr class, so I removed one of them.
2017-06-20 15:47:39 -04:00
Mike Bjerkness
25ae4d42a2 Fix encoding error in ecr/models.py 2017-05-22 23:04:36 -05:00
Mike Bjerkness
35692b5c9a Stub out all remaining ECR methods with NotImplementedError. 2017-05-22 22:49:59 -05:00
Mike Bjerkness
9f019792df Added tests 2017-05-22 21:57:14 -05:00
Mike Bjerkness
588e211c71 Adding ECR 2017-05-22 15:50:22 -05:00