* 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
* supporting utf-8 in key deletions
* Fixed decoding of version body when regexing
* Fixed some more random errors
* Possible fix
* Fixed unused import
* Added UTF comment Py2
* Added support for SSM get_parameters_by_path.
Signed-off-by: Kai Xia <xiaket@gmail.com>
* add logic to handle trailing '/'.
Also, fix pep8.
Signed-off-by: Kai Xia <kai.xia@sportsbet.com.au>
* add tests for parameter value in response.
Signed-off-by: Kai Xia <kai.xia@sportsbet.com.au>
According to AWS API reference and Boto documentation they are to begin the record listing from,
not for filtering. So their current behavior in moto is not consistent with AWS.
* fixed bug where we were using elb_backend.describe_load_balancers
incorrectly, returning all available load balancers when we wanted none.
* improve skip, clean up tests
* X-Ray Client SDK patched
Fixes#1250
* Fixed flake8
* Fixed some issues
* Fixed flake8
* Fixed more typos
* Fixed python2 string
* Fixed aws-sdk patch order
* Added more test cases to test the patching
* Fixed#1261 dynamodb FilterExpression bugs
FilterExpression was incorrectly handling numbers, stupid typo there. Also >= <= and <> was not being parsed correctly.
* Switched up logic a bit for better end result. Fixes#1263
* Fixed another bug
boto uses the param.member.N syntax, but boto3 replaces the generic
.member with a more specific identifier.
Example:
boto: ClusterSecurityGroups.member.N
boto3: ClusterSecurityGroups.ClusterSecurityGroupName.N
This commit addresses this issue for the ClusterSecurityGroups, SubnetIds,
and VpcSecurityGroupIds parameters.
- Implement create_tags, describe_tags, and delete_tags endpoints
- Clusters, Parameter Groups, Security Groups, Snapshots, and Subnet Groups can all be tagged
- Test Suite updated
- Minor clean-up of restore_from_cluster_snapshot endpoint
- Miscellaneous typo fixes
* updates
- support lambda messages from SNS
- run lambda in docker container
* decode output
* populate timeout
* simplify
* whoops
* skeletons of cloudwatchlogs
* impl filter log streams
* fix logging
* PEP fixes
* PEP fixes
* fix reset
* fix reset
* add new endpoint
* fix region name
* add docker
* try to fix tests
* try to fix travis issue with boto
* fix escaping in urls
* fix environment variables
* fix PEP
* more pep
* switch back to precise
* another fix attempt
* fix typo
* fix lambda invoke
* fix more unittests
* work on getting this to work in new scheme
* fix py2
* fix error
* fix tests when running in server mode
* more lambda fixes
* try running with latest docker
adapted from aiodocker
* switch to docker python client
* pep fixes
* switch to docker volume
* fix unittest
* fix invoke from sns
* fix zip2tar
* add hack impl for get_function with zip
* try fix
* fix for py < 3.6
* add volume refcount
* try to fix travis
* docker test
* fix yaml
* try fix
* update endpoints
* fix
* another attempt
* try again
* fix recursive import
* refactor fix
* revert changes with better fix
* more reverts
* wait for service to come up
* add back detached mode
* sleep and add another exception type
* put this back for logging
* put back with note
* whoops :)
* docker in docker!
* fix invalid url
* hopefully last fix!
* fix lambda regions
* fix protocol
* travis!!!!
* just run lambda test for now
* use one print
* fix escaping
* another attempt
* yet another
* re-enable all tests
* fixes
* fix for py2
* revert change
* fix for py2.7
* fix output ordering
* remove this given there's a new unittest that covers it
* changes based on review
- add skeleton logs test file
- switch to docker image that matches test env
- fix mock_logs import
* add readme entry