Taro Sato
b632df3aa4
Generate proper empty value for XML/JSON
2016-10-16 21:49:10 -07:00
Steve Pulec
2e33e2be90
Merge pull request #735 from rocky4570/dryrun-ec2
...
Add dry_run to a number of EC2 services
2016-10-16 19:14:57 -04:00
rocky4570fft
d6f76cbb43
Add dry_run to a number of EC2 services
2016-10-16 00:34:52 +10:00
Taro Sato
7cd404808b
Better EMR coverage and boto3 request/response handling
...
This revision includes:
- A handler for requests for which content-type is JSON (from boto3).
- A decorator (generate_boto3_response) to convert XML responses to
JSON (for boto3). This way, existing response templates for boto can
be shared for generating boto3 response.
- Utility class/functions to use botocore's service specification data
(accessible under botocore.data) for type casting, from query
parameters to Python objects and XML to JSON.
- Updates to response handlers/models to cover more EMR end points and
mockable parameters
2016-10-13 16:48:07 -07:00
Collin RM Stocks
1b65c45b56
ALWAYS use utcnow(), never now()
2016-09-07 14:40:52 -04:00
Jesse Szwedko
ef10df0636
Update format of S3 client errors
...
To match
http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
which documents that it should be at the top level rather than nested
under `Errors`.
2016-07-08 19:32:34 +00:00
Nuno Santos
68eeb5948b
Strip extra whitespace and newlines from SQS response templates.
...
Fixes #623
2016-06-02 12:26:50 +02:00
Steve Pulec
aebc7c8ea3
Merge pull request #558 from spulec/apigateway
...
Apigateway
2016-03-05 18:07:20 -05:00
Steve Pulec
45f92fb4c7
base rest api endpoints.
2016-03-01 12:03:59 -05:00
Andrew Garrett
ec10699c38
Add XML support for cloudformation commands that lacked it
...
This lets boto3's cloudformation API work with moto.
fixes #444
Signed-off-by: Scott Greene <scott.greene@getbraintree.com>
2016-02-29 19:50:23 +00:00
Steve Pulec
eba9033cc9
cleanup flask paths with trailing slashes.
2016-01-24 17:13:32 -05:00
Steve Pulec
a53a97d136
Cleanup SWF to use HTTP exceptions so that the standalone server will work. Closes #495 .
2016-01-17 18:00:57 -05:00
Akira Chiku
0c910864d3
Use requests.header instead of plain dict
2015-11-28 19:26:17 +09:00
Steve Pulec
705ec314a3
Cleanup different places using unix_time()
2015-11-27 14:14:40 -05:00
Jean-Baptiste Barth
a06f8b15f5
Add moto.core.utils.underscores_to_camelcase()
2015-11-23 14:09:31 +01:00
Steve Pulec
32dd72f6b7
Change BaseResponse action parsing to be a bit more generic.
...
Some service like SWF have action headers like
com.amazonaws.swf.service.model.SimpleWorkflowService.<action>. By using
-1 instead of 1, we can accomodate both scenarios.
2015-11-14 13:42:22 -05:00
Steve Pulec
d3e4c2c4b5
Add ability for specific backends to enable template escaping. Closes #441 .
2015-11-03 09:25:47 -05:00
Steve Pulec
3ed9428cb0
Cleanup class decorator. Closes #363 .
2015-06-27 19:01:01 -04:00
Jeffrey Gelens
e722b67f36
Merge branch 'master' of https://github.com/spulec/moto into 0.4.1-threadsafe
...
* 'master' of https://github.com/spulec/moto: (25 commits)
Add @zkourouma to authors.
0.4.2
Fix bug where listener certificate was not being saved correctly when creating an elb. Added test to cover that case.
[dynamodb2] adds lookup method to Table class
Add IAM list_groups and list_groups_for_user. Closes #343 .
Fix for deleting Route53 record sets with set identifiers. Closes #342 .
Use dummy date instead of an invalid date
Adding support for comments on hosted zones.
Add availability zone support to Subnets created via CloudFormation
Make availability zone dynamic in Subnet Response templates
Add filter "availabilityZone" to DescribeSubnets and add availability zone support too
allow starting without reseting
Fix bug with empty string for instance vpc_id. Closes #337 .
Fix default security group description.
Update responses.py
Add @mrucci to authors.
Fix merge conflicts.
Add support for ELB attributes.
cast to int when doing math.
General cleanup.
...
2015-05-29 11:35:14 +02:00
James Porter
fae22fd872
allow starting without reseting
2015-04-02 22:47:11 -05:00
Jeffrey Gelens
c2f2c16892
Fixed non threadsafe code
2015-03-16 13:13:40 +01:00
Konstantinos Koukopoulos
f46c2508c0
allow running mock_s3 and mock_s3bucket_path one after the other
2015-02-20 21:50:49 +02:00
Konstantinos Koukopoulos
7c719269be
create a base RESTError exception
2015-02-10 15:31:28 +02:00
Steve Pulec
56007660d8
Cleanup parameter parsing.
2014-12-31 13:23:08 -05:00
dreadpirateshawn
9affa7753d
Performance: Leverage jinja2's Environment to cache compiled Templates.
2014-12-12 12:46:07 -08:00
Steve Pulec
1a015d0e39
Cleanup some incorrect date formats.
2014-11-29 23:34:40 -05:00
Steve Pulec
da15fb711d
Basic Kinesis Stream CRUD.
2014-11-26 10:55:58 -05:00
Steve Pulec
aceb30e530
Add basic CRUD.
2014-11-22 14:03:09 -05:00
Steve Pulec
828ed13bde
Allow for class-based decorator. Closes #157
2014-11-16 19:05:28 -05:00
Steve Pulec
aa7233a2db
Fixes for multi-region SQS.
2014-11-16 17:57:46 -05:00
Steve Pulec
8bc8f09b47
Some flake8 cleanup.
2014-11-15 09:35:52 -05:00
Joseph Lawson
cb88b8783d
raise NotImplementedError on unknown metadata path
2014-10-15 13:43:38 -04:00
Steve Pulec
9de7969d2b
Fix merge conflicts.
2014-10-05 21:55:23 -04:00
Steve Pulec
c6cb503b61
Make _get_multi_param smarter.
2014-08-29 20:31:02 -04:00
David Baumgold
eedb4c4b73
Support Python 3 using six
2014-08-28 10:57:43 -04:00
David Baumgold
4201e6b430
from __future__ import unicode_literals
2014-08-27 11:33:55 -04:00
Hugo Lopes Tavares
82eef28937
Add multi-region support to EC2 Instances
2014-08-26 17:56:56 -04:00
Konstantinos Koukopoulos
76a6a86eac
add Model metaclass to collect model accessor methods from backend classes
2014-06-18 10:46:20 +03:00
Steve Pulec
0fbe7a3940
Merge pull request #133 from kouk/server_response_headers
...
don't provide request headers as response headers in server
2014-05-20 08:48:48 -04:00
Konstantinos Koukopoulos
2b186511e8
don't provide request headers as response headers in server
2014-05-20 14:43:57 +03:00
Chris St. Pierre
fab37942c4
Consistent _get_multi_param() function in responses
...
This abstracts _get_multi_param() into BaseResponse and makes it
always ensure that the string it has been given ends with a '.'. It
had been implemented in three different places, and in use it rarely
postpended a trailing period, which could make it match parameters it
shouldn't have.
2014-05-08 10:44:41 -04:00
Ilya Sukhanov
e76b4c1250
Fix: Preseve status code in header when != 200
...
before:
reply: 'HTTP/1.1 400 Bad Request\n'
header: date: Wed, 16 Apr 2014 00:30:07 GMT
header: content-type: text/plain; charset=utf-8
header: content-length: 286
header: server: Python/HTTPretty
header: status: 200
header: connection: close
after:
reply: 'HTTP/1.1 400 Bad Request\n'
header: date: Wed, 16 Apr 2014 00:32:45 GMT
header: content-type: text/plain; charset=utf-8
header: content-length: 286
header: server: Python/HTTPretty
header: status: 400
header: connection: close
Note how status and reply http did not match before but do now.
2014-04-22 17:35:15 -04:00
Ilya Sukhanov
aa644b4340
Allow returning http errors with exceptions
...
before:
def my_response_method(self):
...
if error:
return template, {'status'=400}
after:
def my_response_method(self):
...
if error:
raise MyResponseError("bad thing happened")
where MyResponseError inherits from HTTPException
2014-04-22 17:35:15 -04:00
Steve Pulec
ef876dd27e
Fix merge conflicts. Add basic cloudformation support. Closes #111 .
2014-03-27 19:12:53 -04:00
Steve Pulec
8b278eb05d
Clean up querystring logic.
2013-12-29 21:50:25 -05:00
Andres Riancho
c6515af8bf
Now we have a stand-alone server which can provide services for more than one backend at the same time
2013-12-29 21:50:05 -05:00
Steve Pulec
c1f224954e
Cleanup some style
2013-12-29 08:59:07 -05:00
Steve Pulec
2073dc769a
Clean up querystring logic.
2013-12-28 20:15:42 -05:00
Andres Riancho
d58f406de4
Fixes https://github.com/spulec/moto/issues/74
2013-12-28 20:15:42 -05:00
Andres Riancho
186b40de54
All tests pass! Fixes https://github.com/spulec/moto/issues/72
2013-12-26 13:52:03 -03:00