Commit Graph

5551 Commits

Author SHA1 Message Date
nom3ad
fe361f861d
Enable more unit tests for ACM (#3372)
* Enable more unit tests for ACM

* put a smile on travis-ci face

Co-authored-by: nom3ad <nom3ad@gmail.com>
Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
2020-10-12 14:43:36 +01:00
waynemetcalfe
0a938f7bb4
issue-3379 iam list_roles: implement PathPrefix, MaxItems and Marker (#3380)
* issue-3379 iam list_roles: implement PathPrefix, MaxItems and Marker

* issue-3379 fix cloudformation test
2020-10-12 12:13:20 +01:00
nom3ad
ea0ba91f63
support Tags parameter in ACM import_certificate() and request_certificate() methods (#3373)
* ACM: support `tags` parameter in import_certificate()

* ACM: support tags parameter in  request_certificate()

* ACM: better tag operations with more unit tests

Co-authored-by: nom3ad <nom3ad@gmail.com>
2020-10-12 07:55:14 +01:00
nom3ad
502818be4c
Fixes acm:describe_certificate for imported certificates having no SAN extension (#3370)
* Fix(test_acm): describe_certificate testcase does't execute

* handle acm certificates lacking extensions

Co-authored-by: nom3ad <nom3ad@gmail.com>
2020-10-10 22:32:42 +01:00
Brian Pandola
c54f182ca1
Implement additional filters for ecs.ListTasks (#3376)
Closes #1785
2020-10-10 20:02:08 +01:00
Brian Pandola
4a336b8b04
Add ec2.vpc resource support to Tagging API (#3375)
Closes #1849
2020-10-10 19:05:21 +01:00
Brian Pandola
a2bd4515eb
Add better support for SQS MaximumMessageSize attribute (#3374)
Closes #3205
2020-10-10 17:54:36 +01:00
ezramorris
1e8f87a55d
Update table in README.md to render nicely in GitHub (#3369)
Co-authored-by: Ezra Morris <ezra.morris@smartcomptech.com>
2020-10-10 16:57:46 +01:00
Brian Pandola
db7842653f
iot:DeleteThingGroup should return success even for non-existent groups (#3367)
Closes #3026
2020-10-09 15:57:00 +01:00
Brian Pandola
c1b2c78db2
Fix TagFilter implementation in tag:GetResources (#3366)
The `tag_filter` method has been re-arranged to mimic the actual AWS behavior:
Return `True` if *any* tag matches a filter and *all* filters are matched.

Python's closures are late-binding, so we have to modify the lambdas accordingly!

Closes #2814
2020-10-09 13:55:48 +01:00
Brian Pandola
d00cefa25c
Add tagging to ec2.CopySnapshot (#3365)
The `@freeze_time` decorator was removed because it is not necessary (and was
causing the test to be skipped).

Closes #2940
2020-10-09 12:33:07 +01:00
ljakimczuk
c26bef6f79
Updates to FlowLogs and IMPLEMENTATION_COVERAGE (#3356)
* Replacing Unsuccessful class with tuple

* Updating coverage
2020-10-06 06:33:16 +01:00
Anton Grübel
349b9a990d
Add registeredAt to ecs container instance (#3358) 2020-10-05 15:39:59 +01:00
Sarang Joshi
08da2c92d9
fix(dynamodb2): Fix update_item nested insert (#3355)
When comparing old and new values when doing a nested item update, the
`!=` implementation fails when the value being compared is `None`. This
results in an exception when trying to insert a new item into a nested
map. So just do a quick check that the original value is exists before
doing the comparison, as the `None` default is what is tripping this.
2020-10-05 13:40:33 +01:00
Jon Michaelchuck
2391a4ab97
[SecretsManager] Handle missing secrets versions (#3349)
* SecretsManager - handle missing secrets versions

The get_secret_value method should raise ResourceNotFoundException
if a secret exists but the provided VersionId does not.

* Run black

* 2.x support

* black fix?

* secret is not a dict. Fix error msg output.
2020-10-05 12:22:54 +01:00
Roman Dmytrenko
c1a7f29c62
Fix issue with wrong parameter signed to secret_binary during secret rotation in Secrets Manager (#3348)
* fix issue with wrong parameter signed to secret_binary

* reformat test
2020-10-05 11:10:32 +01:00
usmangani1
a65c0f004c
Fix:SQS Receive Message (MessageAttributes) in response (#3303)
* Fix:SQS Receive Message (MessageAttributes) in response

* Fixed tests

Co-authored-by: usmankb <usman@krazybee.com>
2020-10-05 10:10:24 +01:00
jweite
9bc6bded6e
EMR: Support for StepConcurrencyLevel. (#3351)
Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-10-02 14:07:13 +01:00
ljakimczuk
a668349a70
Add set_default_policy_version to the IAM backend (#3347)
* Adding set_default_policy_version

* Adding tests and reformatting

* Reformatting tests
2020-10-01 10:24:03 +01:00
Steve Pulec
7cead73aa1
Merge pull request #3341 from bblommers/bugfix/3302
SecretsManager: Make Secret ARN persistent
2020-09-30 16:02:32 -05:00
usmangani1
f9ce99f0d1
Fix:SQS md5 calculation for custom string data type. (#3346)
* Fix:SQS md5 calculation for custom string data type.

* Linting

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-09-30 18:40:00 +01:00
usmangani1
1c3ba83fc2
Fix : SQS Create Queue with attributes (#3345)
* Considering only new attributes while queue creation

* Linting

Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-09-30 16:34:15 +01:00
jweite
1dd5cf08a8
Transcribe Medical Support (#3299)
* Transcribe first cut: Medical: start, get and delete jobs.

* Added list_medical_transcription_job() support to Transcribe.

* Support for medical vocabularies.

* Added transcribe to list of backends to fix server mode error.

* PR3299 requested changes: don't offer deprecated decorator, regionalize download_uri, create/use service-specific exceptions.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-09-30 13:18:26 +01:00
Ellynas
ebb1c6bd68
Update IMPLEMENTATION_COVERAGE.md (#3342)
ec2 `run_instances()` seems to be implemented [here](3bc18455a2/moto/ec2/responses/instances.py (L48)) and should be marked as such
2020-09-29 13:58:13 +01:00
Giovanni Torres
195ba81c56
feat: update events remove_targets API response (#3340)
* feat: update events remove_targets API response

* test: add missing test for expected exception
2020-09-29 11:51:17 +01:00
Bert Blommers
369f6bbfc9 3302 - Make Secret ARN persistent 2020-09-28 14:51:30 +01:00
ljakimczuk
3bc18455a2
WIP: Introducing VPC Flow Logs (#3337)
* Start working on flow logs

* Change test

* Constructing tests

* Changing exceptions and adding more tests

* Adding more tests

* Changing model and adding more tests

* Adding support for tags

* Mocking Access error with non-existing Log Group Name

* Adding FlowLogAlreadyExists support

* Changing style

* Reformatted code

* Reformatted tests

* Removing needless test

* Adding support for CloudFormation

* Reformatting slightly

* Removing arnparse and using split

* Rearranging tests

* Fixing FilterNotImplementedError test

* Moving imports to 'if' clauses and adding explicit test for 'cloud-watch-logs' type

* Setting names matching boto3 API and restoring 'not-implementd-filter' test

* Reformatting tests with black
2020-09-28 07:16:06 +01:00
usmangani1
55e7caccfe
Fix:EC2 Tags in create vpc and create subnet (#3338)
Co-authored-by: usmankb <usman@krazybee.com>
2020-09-27 09:24:17 +01:00
Benjamin
82dbaadfc4
added organizations detach_policy response, model, and tests, issue #… (#3278)
* added organizations detach_policy response, model, and tests, issue #3239

Signed-off-by: Ben <ben.lipscomb@fmr.com>

* Created individual tests for detach_policy exceptions, updated regex statements for Root, OU, and Account Id
2020-09-25 16:55:29 +01:00
Wolfgang Bauer
a4701dbbe6
Add tags to Elastic IP Addresses (#3310)
* Make ElasticAddress a tagged resource

To be able to filter on tags on ElasticAddresses, I need to have tags.

* remove unneeded commented lines

Was beginning of how to to it before further checking how it is done with other resources.

* do not ignore network-interface-owner-id filter

* add TODO about currently hardcoded region

* remove hardcoding region

* add testing for tags

creating and allocation, adding tags and querying for it

* separate test for tags into own method

* Linting

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-09-25 15:25:30 +01:00
Steve Pulec
ce60e9e3b8
Merge pull request #3314 from bblommers/dependency-test
List dependencies for services - add integration test
2020-09-23 07:07:31 -05:00
jweite
cd20668e9c
Support for autoscaling policies in run_jobflow, add_instance_group and list_instance_groups. (#3288)
Support for cluster_id parameter substitution in autoscaling policy cloudwatch alarm dimensions.
New operations put_autoscaling_policy and remove_autoscaling_policy support

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-09-23 11:21:45 +01:00
Steve Pulec
d54eafa420
Merge pull request #3326 from bblommers/bugfix/3306
Fix S3 creation date for AWS Java SDK
2020-09-22 16:44:56 -05:00
Macwan Nevil
427a222aa0
feature added: support for api RolePermissionsBoundary (#3329)
* feature added: support for api PutUserPermissionsBoundary; DeleteRolePermissionsBoundary

* minor test fix

* lint fixed

* refractored test case

* Issue 3224 s3 copy glacier object (#3318)

* 3224 Enhancement - S3 Copy restored glacier objects

- adds setter for expiry date
- copy sets expiry date to none when source is glacier object
- throws error for copying glacier object only if not restored/still restoring

* 3224 Enhancement - S3 Copy restored glacier objects

- throws error for copying deep archive object only if not restored/still restoring

* Fix:s3 List Object response:delimiter  (#3254)

* Fix:s3 List Object delimiter in response

* fixed tests

* fixed failed tests

Co-authored-by: usmankb <usman@krazybee.com>

* feature added: support for api PutUserPermissionsBoundary; DeleteRolePermissionsBoundary

* minor test fix

* lint fixed

* refractored test case

* added test case for put role exception

Co-authored-by: ruthbovell <63656505+ruthbovell@users.noreply.github.com>
Co-authored-by: usmangani1 <sgosman_chem@yahoo.com>
Co-authored-by: usmankb <usman@krazybee.com>
2020-09-22 12:43:59 +01:00
Ben Dennerley
958e95cf5c
Make IoT certificate ID generation deterministic and prevent duplicate certificates from being created (#3331)
* Make IoT certificate id generation deterministic

Fixes #3321

As per https://stackoverflow.com/questions/55847788/how-does-aws-iot-generate-a-certificate-id,
the IoT certificate ID is the SHA256 fingerprint of the
certificate. Since moto doesn't generate full certificates we will
instead use the SHA256 hash of the passed certificate pem.

* Don't allow duplicate IoT certificates to be created

Fixes #3320

When using boto3, trying to register a certificate that already
exists will throw a ResourceAlreadyExistsException. Moto should
follow the same pattern to allow testing error handling code in
this area.
2020-09-22 10:28:12 +01:00
Mike Grima
672a4b9a27
Merge pull request #3202 from nick123pig/config-for-iam-role-policy
Config for IAM roles and policies
2020-09-21 19:15:06 -07:00
Nick Stocchero
e2fe33bf07 duplicate dict.get logic 2020-09-21 17:56:04 -06:00
Nick Stocchero
56c78ee39f use get instead of direct dict access 2020-09-21 17:42:44 -06:00
Nick Stocchero
fc7f3fecb6 clean up and bring up to master 2020-09-21 17:42:44 -06:00
Nick Stocchero
4354cb06d1 remove comment 2020-09-21 17:42:44 -06:00
Nick Stocchero
fd69c93a09 use botocore regions and refactor sorting 2020-09-21 17:42:44 -06:00
Nick Stocchero
8d5c70a924 different aggregation strategy 2020-09-21 17:42:44 -06:00
Nick Stocchero
d8cea0213d straighten out filter logic 2020-09-21 17:42:44 -06:00
Nick Stocchero
8dd90db83c add missing test for policies 2020-09-21 17:42:44 -06:00
Nick Stocchero
ceefe970bc small flake issue 2020-09-21 17:42:44 -06:00
Nick Stocchero
ff84b63484 address PR comments 2020-09-21 17:42:44 -06:00
Nick Stocchero
7bc5b5c08f Add IAM Role and Policy to Config 2020-09-21 17:42:44 -06:00
ayushbhawsar
2e0e542efe
added cognito idp function admin_set_user_password to the code (#3328)
* added cognito idp function  to the code

* fixed linting issues
2020-09-21 18:40:07 +01:00
usmangani1
0b9903a3df
Fix:s3 List Object response:delimiter (#3254)
* Fix:s3 List Object delimiter in response

* fixed tests

* fixed failed tests

Co-authored-by: usmankb <usman@krazybee.com>
2020-09-21 16:21:18 +01:00
ruthbovell
1022aa0968
Issue 3224 s3 copy glacier object (#3318)
* 3224 Enhancement - S3 Copy restored glacier objects

- adds setter for expiry date
- copy sets expiry date to none when source is glacier object
- throws error for copying glacier object only if not restored/still restoring

* 3224 Enhancement - S3 Copy restored glacier objects

- throws error for copying deep archive object only if not restored/still restoring
2020-09-21 07:37:50 +01:00