* Correctly return all snapshots for a given DBInstanceIdentifier.
* If an invalid DBInstanceIdentifier is passed in, return an empty array
instead of raising a ClientError (which is what AWS actually does).
Fixes#1569
* Added Filtering support for S3 lifecycle
Also added `ExpiredObjectDeleteMarker`.
closes#1533closes#1479
* Result set no longer contains "Prefix" if "Filter" is set.
* Flask Request object does not have a 'body' attribute, changed to 'data'
* Making moto 'glaciar' more aws 'glaciar' like.
* Making moto 'glacier' more aws 'glacier' like.
* Fixing Travis errors?
* OK, check if object has proper attribute because HTTPrettyRequest has no data attribute and Python Requests has no body attribute.
* Output to match test expectation; sleep for 60 seconds to mimic actual wait time.
* Amending test_describe_job to reflect changes.
* Shorten time from 1 minute to seconds.
* Shorten sleep time in test. Forgot about the test.
* Some circumstances need subdomains to be ignored rather that interpreted as bucketname, this patch allows such behaviour to be configured
* Adding helper case whereby localstack features as path based exception
* Remove whitespace :(
* Enable Extended CIDR Associations on VPC
* Ooops missed the utils, try to be more flakey?, remove unnecessary part in tests
* try to be even more flakey
I had an EMR step that contained a `&` and this caused the ListStep call to fail.
I've added the `| escape` filter to handle it in this case and a few other cases that look like they could suffer the same fate.
* Delete the volume used during AMI creation
Creating an AMI doesn't actually result in the creation of an EBS
volume, although the associated snapshot does reference one. To that
end, delete the volume once we've used it.
* Add `owner_id` to `Snapshot`, verify AMI snapshots
The default AMIs which are created by moto have EBS volume mappings
but the snapshots associated with those don't have the correct
owners set.
This adds the owner to the snapshot model and passes it through from
the JSON data.
* Add support for FilterPolicy to sns subscription set_filter_attributes
* Add basic support for sns message filtering
This adds support for exact string value matching along with AND/OR
logic as described here:
https://docs.aws.amazon.com/sns/latest/dg/message-filtering.html
It does not provide support for:
- Anything-but string matching
- Prefix string matching
- Numeric Value Matching
The above filter policies (if configured) will not match messages.
* Return correct error code when fetching a queue that does not exist
* Improve SQS Queue get and set attributes
* Queue creation and set_attributes uses the same code path
- ensure bool/int values are cast correctly
* RedrivePolicy is handled properly with set_attributes
- _setup_dlq is called
- is json decoded, so that returned RedrivePolicy is not json
encoded twice
* As per AWS not all attributes are returned when they are not set, for
example RedrivePolicy, FifoQueue, Policy, Kms*
* WaitTimeSeconds is not a queue attribute switch to
ReceiveMessageWaitTimeSeconds
* Add `region_name` to the client to be consistent with other tests
* Add `VPCZoneIdentifier` to the ASG creation (AZ or VPC is required)
* Add myself as a contributor
The logic which contructed a list of values for parameters with
multiple values was flawed in that e.g. `Subnet.1` and `Subnet.10`
would be have their values counted against `Subnet.1` because they
share a prefix.
This now checks for a starting `.` before counting that name as
having the requested prefix.
The AWS docs say that: "Currently, the resource types that support
tagging on creation are instance and volume." Calling `create_volume`
and passing `image` as the resource type in tag specifications causes
an `InvalidParameterValue` error.
- missing and malformed image ids
- test_ami_filters
- test_ami_copy tests
- test_ami_create_and_delete test
- test_ami_filter_wildcard test
- the rest of the tests by using the non-deprecated mock_ec2
In trying to debug changes to the ami mock introduced in 1.1.25,
I noticed that the ami tests were not running. Turns out that nose does not
run test files that are executable.
http://nose.readthedocs.io/en/latest/finding_tests.html
The ami test file was the only test file I could find that had the executable bit set.
The 'DESCRIBE_ALARMS_TEMPLATE' response template references a 'state_value' attribute on the 'FakeAlarm' model which does not exist; it is named 'state'.
This commit updates the attribute to be called 'state_value', in-line with the naming convention used elsewhere.
* 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.
* Fix variable name typo
* Make it possible to delete EC2 instances from cloudformation json
* Add support for updating a cloudformation stack from an s3 template url
* fix KeyError in delete_alias in the KmsBackend.
If there're several aliases in the backend, previously we will bump into
a KeyError here.
Signed-off-by: Kai Xia <xiaket@gmail.com>
* add doc to make travis try one more time.
Signed-off-by: Kai Xia <xiaket@gmail.com>
a
* add another key and alias before the deletion of an alias.
This was done to make sure that we can correctly handle the deletion
when there are more than one alias defined.
Signed-off-by: Kai Xia <xiaket@gmail.com>
* Initialize EC2ContainerServiceBackend and ContainerInstance objects with region_name
* Initialize ContainerInstance with default attributes
* These attributes are automatically applied by ECS when a container is registered
* Docs: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes
* Format container_instance.attributes for response_object
* Python3
* Only use available ECS regions for ecs_backends
* Sort dictionaries on key='name' using lambda
* Sort all dicts in tests using lambda
* Ran scaffold
* Made a start on get_resources.
* Added more EC2 to tag list
* More stuff
* Added more methods
* Added S3 region name
* Added values test
* Some final touchups
* SNS create_topic should only accept valid characters
Closes#1328
* Fix flake8 errors
* Updated regex to match full TopicName constraints
Fixed test_server as it contained invalid TopicNames’ per constraints
* fix error message for invalid topic name
* Adding owner-id/OwnerId to the AMI classes to allow the value to be specified to test filtering images based on owner.
* Added default AMIs and filtering by owner-id
* Fixed some tests
* Fixed more random tests
* Updated MANIFEST
* .
* append appropriate urls when scaffolding
* make dispatch for rest-api
* fix dispatch for rest-json
* fix moto/core/response to obtain path and body parameters
* small fixes
* remove unused import
* fix get_int_param
* Add features of things and thing-types
* fix scaffold
* basic crud of cert
* support basic CRUD of policy
* refactor
* fix formatting of scaffold
* support principal_pocicy
* support thing_principal
* update readme
* escape service to handle service w/ hyphen like iot-data
* escape service w/ hyphen
* fix regexp to extract region from url
* escape service
* Implement basic iota-data feature
* iot-data shadow delta
* update readme
* remove unused import
* remove comment
* fix syntax
* specify region when creating boto3 client for test
* use uuid for seed of generating cert id
* specify region_name to iotdata client in test
* specify region to boto3 client in moto response
* excude iot and iotdata tests on server mode
* fix handling of thingTypeName in describe-thing
* test if server is up for iot