Commit Graph

5888 Commits

Author SHA1 Message Date
Bert Blommers
0f4ab4da1c
S3 - Dont error when deleting unknown keys (#4036)
* #1581 - S3 - Dont error when deleting unknown keys

* Update test_s3bucket_path.py
2021-06-25 10:26:03 +01:00
Bert Blommers
21a77510b3
Rewrite unnecessary importlib dependency in DynamoDB (#4035) 2021-06-25 07:58:57 +01:00
Bert Blommers
4778377e8e
#4018 - Raise NoSuchUpload when listing a non-existing multipart upload (#4031) 2021-06-24 08:14:28 +01:00
Bert Blommers
4af57c18bd
AWSLambda - Verify we can add multiple files to a Function (#3771) 2021-06-24 06:24:32 +01:00
Bert Blommers
5e4bccc22d
Use centralized ACCOUNT_ID (#4029) 2021-06-23 18:03:11 +01:00
Bert Blommers
6084d6cfe8
DynamoDB - Support AttributeUpdate::DELETE action (#3798) 2021-06-23 17:41:47 +01:00
psheets
b9a42816bd
Fixed validation on custom-resource in applicationautoscaling (#4026)
* Added ResourceTypeExceptions

* Added test for custom-resource

Co-authored-by: Phil Sheets <p.sheets@fetchrewards.com>
2021-06-23 16:57:09 +01:00
Avi Slavkin
6fb05d6453
Update __init__.py (#4024)
In case of DELETE action we don't pass the value if we want to remove the attribute.
There are more cases but it's for you to handle.
2021-06-23 16:53:05 +01:00
Moto Admin
fb9c9c3876 Increase version number post-release 2021-06-20 14:37:28 +00:00
Bert Blommers
02b950b478
Prep release 2.0.10 (#4022)
* Updating implementation coverage

* Changelog for release 2.0.10
2021-06-20 15:34:26 +01:00
D. Ferruzzi
61e2204941
Initial EKS Implementaion (#3981)
* Implemented EKS list_clusters

* Implemented EKS create_cluster

* Implemented EKS describe_cluster

* Implemented EKS delete_cluster

* Implemented EKS list_nodegroups

* Implemented EKS create_nodegroup

* Implemented EKS describe_nodegroup

* Implemented EKS delete_nodegroup

* Implemented EKS Server Tests

* EKS - rework tests to use decorator everywhere

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2021-06-20 11:34:31 +01:00
Bert Blommers
e11dd49edf
When matching URL patterns, the last elem should always at least one char (#4021) 2021-06-20 10:56:40 +01:00
Cristopher Pinzón
e4057a34b9
Added "isTruncated" attribute for listUsersResponse (#4017)
* isTruncated attribute for listUsersResponse

* correction and test
2021-06-18 21:52:15 +01:00
Brian Pandola
a95ca81e76
Support EMR clusters with multiple master nodes (#4019)
Reference: https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-ha-launch.html
2021-06-18 06:04:21 +01:00
Bert Blommers
2f23807a35
#3760 - DynamoDB - only raise exception when GSI key is actually empty (#3763) 2021-06-17 14:07:24 +01:00
Brian Pandola
b0e2a750dc
Disallow termination of protected EMR job flows (#4015)
Error message verified against real AWS backend.
2021-06-17 12:20:45 +01:00
Thomas Ross
67ae84e2c4
Only raise EmptyKeyAttributeException when the value node is empty (#4014)
This fixes a bug where all updates to keys (including GSIs) would raise
EmptyKeyAttributeException, even when the new value was not an empty string.
2021-06-17 12:19:47 +01:00
Bert Blommers
7f0475fc18
Improve version updating; remove dead code (#4016) 2021-06-17 10:12:12 +01:00
Jordi Alhambra
407d5c853d
Media package client error additional handling (#4011)
* Add delete container and list tags endpoints to MediaStore

* Black reformat

* Fixed Lint problems

* Check if dictionary was deleted effectively

* lint fix

* MediaPackageClientError

* Lint Fix

* Test unknown channel describe

* Concatenation Fix

* MediaPackage - fix error message

* MediaPackage Test Fix and TryError

* Lint

Co-authored-by: av <arcovoltaico@gmail.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2021-06-16 21:07:46 +01:00
Moto Admin
fe7430b368 Increase version number post-release 2021-06-12 13:00:38 +00:00
Bert Blommers
cbeeefbec9
Prep release 2.0.9 (#4007)
* Update implementation coverage

* EC2 - Update instance type offerings

* IAM - update list of managed policies

* Changelog for release 2.0.9

* Instance Type Offerings - fix number of available offerings
2021-06-12 13:57:29 +01:00
Sahil Shah
6977bba3e1
Add capability to update AWS::ElasticLoadBalancingV2(Listener and ListenerRule) resource (#4005)
* Add ssm parsing support for cloudformation stacks

* Start adding unit tests for ssm parameter parsing

* Add tests for code update

* Add tests to parse ssm parameters code

* Fix black lint errors

* Fix bug.

* Need to specify region_name

* region needs to be same

* Use ssm_backends[region] instead of ssm_backend

* StringList -> string

* Linting

* check if servermode tests are on

* Typo

* Added support for ListenerRule. Will remove cruft

* Pushing latest

* Something works

* Put back ripped out code

* Save point. Incase I need more validations

* Revert "Save point. Incase I need more validations"

This reverts commit dac4953335dd9335eddb7a91a63667bc3c17104c.

* Fixed validations and some refactor

* Fix formatting

* Linting

* Cannot refactor if I have to fix all tests

* Remove exceptions for now. Will do in another PR

* Remove validations. Will add in next PR

* Fix broken tests. Almost.:

* Fix all tests. Some sneaky for now.

* Python2 making me write bad code

* OrderedDict.move_to_end() does not work in python2

* Linting

* Add more checks to field in conditions later.

* Unwnated change in FakeListener

* Revert "Unwnated change in FakeListener"

This reverts commit 962c2fdfd76fce999de9feccf1dd1c3ec48c459f.

* Add back default listener rule

* Linting fix

* Fix priority sorting

* Add cloudformation test for edge case

* Add validation for ForwardConfig in Action of ListernRule CF

* use not in

* set the priority template correctly

* Check for boolean in condition

* One more check

* Implement update_from_cloudformation_json for Listener and ListenerRule

* Unwanted spaces

* Linting issues

* Add tests for code coverage

Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
2021-06-11 21:56:28 +01:00
Kyle Decot
8d4007f2b6
Escape Hyphen in Regular Expression (#4006)
* Escape Hyphen in Regular Expression

* Add Test

* Fix Linting Errors

* Use Pytest Parameterize Marker

* Fix Black Formatting Errors

* Interpolate / Use Raw String

* fixes string formatting

Co-authored-by: Correna Sprowls <correna.sprowls@joinroot.com>
2021-06-11 21:54:43 +01:00
benediktbrandt
479ce861a7
Env variable for default key buffer size (#4001)
* - introduce environment variable for DEFAULT_KEY_BUFFER_SIZE

* - prefix env variable with MOTO_S3 to avoid env variable conflicts

* - black formatting

* - fix formatting
2021-06-10 10:48:28 +01:00
Brian Pandola
c1b38be02d
Add support for DynamoDB Backup/Restore (#3995)
* Add support for DynamoDB Backup/Restore

Basic support for the following endpoints has been implemented with full test coverage:
- create_backup
- delete_backup
- describe_backup
- list_backups
- restore_table_from_backup

Behavior and error messages verified against a real AWS backend.

* Refactor test based on PR feedback
2021-06-10 07:05:07 +01:00
Brian Pandola
00ccce0723
Refactor listener rule ARN generation to avoid collisions (#4002)
The code that generates an ARN for a listener rule was relying on a random
number between 0 and 50 to ensure uniqueness.  As a result, there was a decent
chance of generating a collision, particularly when adding multiple rules.

When a collision occurred, the new rule simply overwrote an existing rule,
causing a test that asserts on an expected number of rules being returned
to fail.

Reference the following runs for related test failures:
https://github.com/spulec/moto/runs/2772429387
https://github.com/spulec/moto/runs/2786330037
2021-06-10 07:02:30 +01:00
Sahil Shah
3f5408c9d0
Adding support for ForwardConfig property in ListernRule in CloudFormation (#3993)
* Add ssm parsing support for cloudformation stacks

* Start adding unit tests for ssm parameter parsing

* Add tests for code update

* Add tests to parse ssm parameters code

* Fix black lint errors

* Fix bug.

* Need to specify region_name

* region needs to be same

* Use ssm_backends[region] instead of ssm_backend

* StringList -> string

* Linting

* check if servermode tests are on

* Typo

* Added support for ListenerRule. Will remove cruft

* Pushing latest

* Something works

* Put back ripped out code

* Save point. Incase I need more validations

* Revert "Save point. Incase I need more validations"

This reverts commit dac4953335dd9335eddb7a91a63667bc3c17104c.

* Fixed validations and some refactor

* Fix formatting

* Linting

* Cannot refactor if I have to fix all tests

* Remove exceptions for now. Will do in another PR

* Remove validations. Will add in next PR

* Fix broken tests. Almost.:

* Fix all tests. Some sneaky for now.

* Python2 making me write bad code

* OrderedDict.move_to_end() does not work in python2

* Linting

* Add more checks to field in conditions later.

* Unwnated change in FakeListener

* Revert "Unwnated change in FakeListener"

This reverts commit 962c2fdfd76fce999de9feccf1dd1c3ec48c459f.

* Add back default listener rule

* Linting fix

* Fix priority sorting

* Add cloudformation test for edge case

* Add validation for ForwardConfig in Action of ListernRule CF

* use not in

* set the priority template correctly

* Check for boolean in condition

* One more check

Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
2021-06-09 18:41:18 +01:00
Bert Blommers
43426c71f4
ELBv2 - Simplify tests (#3999) 2021-06-09 16:34:53 +01:00
Jordi Alhambra
ae5653b31d
Media package client error (#3983)
* Add delete container and list tags endpoints to MediaStore

* Black reformat

* Fixed Lint problems

* Check if dictionary was deleted effectively

* lint fix

* MediaPackageClientError

* Lint Fix

* Test unknown channel describe

* Concatenation Fix

* MediaPackage - fix error message

Co-authored-by: av <arcovoltaico@gmail.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2021-06-07 13:47:49 +01:00
usmangani1
9836985473
Fix : Logs - Add start_query functionality (#3985)
* Added start_query functionality

* fix tests
2021-06-07 10:37:11 +01:00
usmangani1
d325593e46
Fix:Add list connection API's (#3976)
* Initial commit create connection

* Added connection API's

* Add destination API's

* fixed tests

* fix tests

* Fixed tests
2021-06-07 10:35:28 +01:00
Bert Blommers
74559f2a91
Organisations - Backport re.fullmatch for Py2 (#3990) 2021-06-05 17:53:06 +01:00
stromp
9e4972b43f
Add Tag support for other resource types then an account (#3982)
* - Adding checking for resource type in tag functions
- Adding TargetNotFoundException when no resource found
- Adding support for tags for root OU, OU and Policies
- Adding tests covering the new code
- Adding test for deletion of a tag

* fixed linting issue

* - renamed helper function to a more logical name
- added tests for helper function
- fixed bugs in tests for tag functions

Co-authored-by: Sjoerd Tromp <stromp@schubergphilis.com>
2021-06-05 15:12:17 +01:00
Bert Blommers
25bf10bf8e
Pin Jose-dependency for Py2 (#3989) 2021-06-05 15:04:50 +01:00
Sahil Shah
b82096ba37
Add support for AWS::ElasticLoadBalancingV2::ListenerRule (#3969)
* Add ssm parsing support for cloudformation stacks

* Start adding unit tests for ssm parameter parsing

* Add tests for code update

* Add tests to parse ssm parameters code

* Fix black lint errors

* Fix bug.

* Need to specify region_name

* region needs to be same

* Use ssm_backends[region] instead of ssm_backend

* StringList -> string

* Linting

* check if servermode tests are on

* Typo

* Added support for ListenerRule. Will remove cruft

* Pushing latest

* Something works

* Put back ripped out code

* Save point. Incase I need more validations

* Revert "Save point. Incase I need more validations"

This reverts commit dac4953335dd9335eddb7a91a63667bc3c17104c.

* Fixed validations and some refactor

* Fix formatting

* Linting

* Cannot refactor if I have to fix all tests

* Remove exceptions for now. Will do in another PR

* Remove validations. Will add in next PR

* Fix broken tests. Almost.:

* Fix all tests. Some sneaky for now.

* Python2 making me write bad code

* OrderedDict.move_to_end() does not work in python2

* Linting

* Add more checks to field in conditions later.

* Unwnated change in FakeListener

* Revert "Unwnated change in FakeListener"

This reverts commit 962c2fdfd76fce999de9feccf1dd1c3ec48c459f.

* Add back default listener rule

* Linting fix

* Fix priority sorting

* Add cloudformation test for edge case

Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
2021-06-05 10:04:04 +01:00
Mike Grima
a281f9d4a6
Merge pull request #3987 from mikegrima/fixs3config
Fixed AWS Config S3 ACL issues
2021-06-04 12:01:58 -07:00
Mike Grima
ba7a0fe3a2 Fixed AWS Config S3 ACL issues
- AWS Config appears to have changed how ACLs are returned
- This PR makes moto's behavior consistent with AWS Config's S3 representation

Fixes #3986
2021-06-04 09:23:56 -07:00
Austin Hendrix
5602c4e73e
SSM Parameter Store improvements in GetParameterHistory & GetParameters (#3984)
* Including labels and versions in SSM Get Parameters

* implementing NextToken and MaxResults into the SSM Get Parameter History functionality

* Implementing unit tests and some lint refactoring for NextToken implementation in get_parameter_history
2021-06-04 11:12:35 +01:00
Austin Hendrix
b670962c5e
SSM Parameter Store Error Message When Requesting Invalid Version (#3977)
* Implement correct error when requesting specific version of a parameter which exists but does not have this version

* removing trailing whitespace causing lint failure

* Adding unit tests and fixing linting for new error handling

* Fixing small bug in response message

* Revert change in get_parameters as versioning is not currently implemented in this method. Will fix as a separate PR
2021-06-02 16:27:23 +01:00
Brian Pandola
7947b1e001
Enforce SSM Parameter Version Limit (#3967)
Behavior verified against a real AWS backend.
2021-05-28 08:32:39 +01:00
Bert Blommers
037973c8d9
Batch - remove potential race condition (#3965) 2021-05-28 06:55:01 +01:00
Brian Pandola
3265e89fd3
Allow Glacier VaultName to contain period (#3964) 2021-05-27 08:44:20 +01:00
Florian Dambrine
6adb570c48
Add dot as a valid s3 metadata key (#3958) 2021-05-26 14:27:25 +01:00
Kallan Gerard
75730e6f83
Missing code block language (#3962) 2021-05-26 12:28:22 +01:00
Thomas Maschler
d635c78bd1
AWS Batch enhancements (#3956)
* Check exit status of container

* Added support for job dependencies

* batch container overrides

* add AWS_BATCH_JOB_ID to container env variables

* lint with black

* refactor batch dependency test

* refactor batch dependency test

* fix index

Co-authored-by: jterry64 <justin.terry@wri.org>
Co-authored-by: Daniel Mannarino <daniel.mannarino@gmail.com>
2021-05-26 08:52:09 +01:00
rajinder
fbbc8fc472
basic implementation of update rest api (#3951)
* basic implementation of update rest api

* basic implementation of update rest api

* basic implementation of update rest api

* review comments from bblommers

Co-authored-by: rajinder saini <rajinder.saini@c02vt5k2htd6.corp.climate.com>
2021-05-23 17:09:02 +01:00
Moto Admin
290f6585c2 Increase version number post-release 2021-05-21 07:57:37 +00:00
Bert Blommers
171b5f2c8b
Prep 2.0.8 release (#3948) 2021-05-21 08:54:59 +01:00
Brian Pandola
16f4dc87dc
Add support for tagging Volumes in ec2:RunInstances (#3946) 2021-05-21 06:35:34 +01:00
Jordi Alhambra
7f49cd0ed6
MediaStore delete container and list tags endpoints implemented (#3938)
* Add delete container and list tags endpoints to MediaStore

* Black reformat

* Fixed Lint problems

* Check if dictionary was deleted effectively

* lint fix

Co-authored-by: av <arcovoltaico@gmail.com>
2021-05-20 16:17:31 +01:00