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.
According to the documentation [1], name should be filtered first,
followed by type.
> If you specify both Name and Type
> The results begin with the first resource record set in the list
> whose name is greater than or equal to Name, and whose type is
> greater than or equal to Type.
[1]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListResourceRecordSets.html
* Created test for get_policy with AWS managed policy.
* Created failing test for get_policy_version with AWS managed policy.
* Updated AWS managed policies.
* Fixed failing tests.
* Fixed trying to compare datetime with string in test case.
* Fixed CreateDate of AWS managed policies overwritten by their version's CreateDate.
* Fixed and improved tests for managed AWS policies.
* Added test for AWS managed policy with v4 default version.
* Fixed not correctly returning dates for AWS managed policies.
`str(datetime.utcnow())` returns a timestamp that's not of the same
format as the AWS SDK uses, in short it's missing the `T` between the
date and the time.
This causes issues for e.g. Terraform and probably other AWS Go SDK
users. There seems to be some differences between endpoints whether they
return milliseconds or not, the AWS API docs were reviewed and the
decision whether to return timestamps with milliseconds or not based on
the example response documented.
As the timstamps are generated for uniqueness rather than being
hardcoded and then directly cast to a UTC (Z) formed timestamp pytz was
removed as timezone correctness is probably not important.
* Removed Tags field from create_subnet response.
* Added DefaultForAz to create_subnet response.
* Added MapPublicIpOnLaunch to create_subnet response.
* Added OwnerId to create_subnet response.
* Added AssignIpv6AddressOnCreation field for create_subnet and describe_subnet and implemented setting it in modify_subnet_attribute.
* Added SubnetArn to create_subnet response.
* Added AvailabilityZoneId to create_subnet and describe_subnet responses, and error for invalid availability zone.
* Added Ipv6CidrBlockAssociationSet to create_subnet response.
* Added missing fields to describe_subnets response.
* Added myself to list of contributors and marked describe_subnet as implemented.
* Fixed linting errors.
* Fixed blank line containing a tab.
* Fixed accidentally deleted ).
* Fixed broken tests.
* Fixed a bug where default network ACL entries could not be deleted.
* Implemented throwing error when a network entry with the same rule number and egress value already exists.
* Fixed syntax errors.
* Added socket.timeout to possibly raised exceptions in wait_for for Python 3.
* chore(): remove executable flag on moto/s3/response.py
* chore(): ignore .eggs temp file
* feat(#1987): get bucket acceleration support
* feat(#1987): put bucket acceleration support
* feat(#1987): suspend undefined bucket is a no-op
* feat(#1987): validate accelerate_configuration status
* feat(#1987): bucket containing dots do not support acceleration
* doc(#1987): update implementation coverage
Add a class level store in models/VPCPeeringConnectionBackend of ec2
for saving vpc peering connection.
Any instance can correctly save VPC peering connection info
on both region when it create vpc peering connection.
Update vpc_peering_connections in ec2/responses to meet new version:
DESCRIBE_VPC_PEERING_CONNECTIONS_RESPONSE,
ACCEPT_VPC_PEERING_CONNECTION_RESPONSE,
Previous code only create one region VPC peering connection but
doesn't create the other region VPC peering connection
when create cross region VPC peering connection.
Tested in real AWS environment at first
and create unit test case according to real AWS environment response.
Add 5 test cases
VPC cross region delete case
VPC cross region accept case
VPC cross region accept wrong region case
VPC cross region reject case
VPC cross region reject wrong region case
Related: #1842, #1830
adding support for organizations service control policies
* [Resolves#2196] - endpoints for querying organizations SC policies
I have added the following mock endpoints to the Organizations service:
- create_policy
- list_policies
- describe_policy
- attach_policy
- list_policies_for_target
- list_targets_for_policy
* add proper retentionInDays to describe_log_groups response and add support for delete_retention_policy() and put_retention_policy() to log groups
* fix for inline comment formatting
* include check for retentionInDays to verify no retention by default in test_log_group_create