Commit Graph

49 Commits

Author SHA1 Message Date
Asher Foa
96e5b1993d Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
Stephen Huff
7b1cf9eecd fix(rds2): handle create_db_instance when AllocatedStorage is not specified
In all of the tests of `create_db_instance()`, the `AllocatedStorage`
parameter is provided.  The [RDS API
reference](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html)
says this parameter is optional; however, when none is provided, moto
returns an obscure error message:

```
self = <botocore.parsers.QueryParser object at 0x113745890>, shape = <Shape(Integer)>, text = 'None'

    @_text_content
    def _handle_integer(self, shape, text):
>       return int(text)
E       ValueError: invalid literal for int() with base 10: 'None'

/usr/local/Cellar/pyenv/1.2.13_1/versions/3.7.4/envs/rds_encrypt/lib/python3.7/site-packages/botocore/parsers.py:466: ValueError
```

This PR adds default values that correspond to the current default API
behaviors.
2019-10-15 16:18:37 -04:00
Berislav Kovacki
4ed189c454 Add support for VpcSecurityGroups set/update in RDS 2019-07-13 08:19:23 +02:00
Berislav Kovacki
4fd0b5c710 Add support for OptionGroupName in create_db_instance 2019-07-11 22:43:42 +02:00
Berislav Kovacki
c51ce76ee9 Add InstanceCreateTime to DBInstance 2019-07-09 02:10:33 +02:00
Bendegúz Ács
f408709ef9 VPC IPv4 validation (#2026)
* Implemented throwing invalid subnet range error and fixed breaking tests.

* Implemented throwing invalid CIDR block parameter error for vpcs and subnets.

* Implemented throwing invalid destination CIDR block error.

* IPv6 addresses not accepted, strict checking disabled.

* Implemented throwing invalid subnet conflict error and fixed breaking tests.

* Implemented throwing invalid VPC range error and fixed breaking tests.

* Fixed accidentally removed ).

* Fixed test case trying to create two subnets with the same CIDR range.
2019-05-25 18:35:07 +01:00
Jon Beilke
6eb490ac78 add support for tags to rds snapshots 2018-09-21 12:03:13 -05:00
Jon Beilke
bf9b37142e no need for [DBSnapshot] with list_tags_for_resource as the retuned snapshot already handles it 2018-09-21 08:49:45 -05:00
Jon Beilke
881afc8f4a update RDS models to include CopyTagsToSnapshot 2018-09-21 08:31:31 -05:00
Steve Pulec
23b51c39a1
Merge pull request #1585 from bpandola/fix-1569
Fix rds.describe_db_snapshots bugs
2018-05-30 23:10:20 -04:00
Brian Pandola
37d6388640 Fix rds.describe_db_snapshots bugs
* 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
2018-04-19 20:21:27 -07:00
Steve Pulec
311966e28d Add IAMDatabaseAuthenticationEnabled and DbiResourceId to RDS response. Closes #1465. 2018-04-18 22:47:02 -04:00
Koudai Aono
518282dbd3 change get_param method to get_int_param 2018-01-25 00:51:14 +09:00
Ben Slusky
796fa6647b modify_db_instance should be able to rename DB instances (#1367) 2017-11-30 11:41:25 +00:00
justinsr20
17b8396a9c updated rds status from shutdown to stopped to match aws (#1347) 2017-11-20 09:07:36 +00:00
rocky4570fft
592bf868ff remove test for rds snapshot quota exceed as moto_server doesnt support it 2017-08-15 10:34:10 +10:00
rocky4570fft
c84e8c86f0 modify to use create_snapshot, add extra tests for certain error conditions 2017-08-15 00:55:09 +10:00
rocky4570fft
ed39c2ea4e fix up some issues found in unittests - comment out snapshotting until later 2017-08-14 00:27:15 +10:00
Jack Danger Canty
c3d9f4e056 Persisting selected LicenseModel in RDS instances 2017-07-05 16:02:45 -07:00
Jack Danger Canty
e57798cb96 Implementing snapshots on rds instance deletion 2017-06-20 14:46:13 -07:00
Jack Danger Canty
63f01039c3 Implementing RDS Snapshots 2017-06-20 13:52:21 -07:00
Jack Danger Canty
05ddcef2a0 Re-enabling tests on Python3 2017-06-20 11:58:18 -07:00
Jack Danger Canty
559a863d7f Include db_name when describing RDS instances 2017-06-13 17:09:09 -07:00
Steve Pulec
bbfd307f5e Merge pull request #935 from JackDanger/support-rds-default-ports
support default ports in RDS
2017-05-10 22:24:03 -04:00
Steve Pulec
0adebeed24 Merge #913. 2017-05-10 21:58:42 -04:00
Jack Danger Canty
6d8aa9d8f1 support default ports in RDS 2017-05-08 20:05:46 -10:00
Adam Stauffer
c5853b48da update RDS responses to return DBInstanceArn 2017-03-13 16:48:22 -04:00
Steve Pulec
f37bad0e00 Lints. 2017-02-23 21:37:43 -05:00
Steve Pulec
fde721bed7 Testing new version of decorator. 2017-02-15 22:35:45 -05:00
Michael Nussbaum
74bbd9c8e5 Various RDS, RDS/Cloudformation, RDS/KMS improvements. (#789)
We need to mock out deploying RDS instances with full disk encryption
and detailed tagging. We also need to be able do deploy these instances
with Cloudformation, and then access them with both boto and boto3.

* Join RDS and RDS2 backends - this makes RDS resources created via
  either of the two boto RDS APIs visible to both, more closely
  mirroring how AWS works
* Fix RDS responses that were returning JSON but should be returning XML
* Add mocking of RDS Cloudformation calls
* Add mocking of RDS full disk encryption with KMS
* Add mocking of RDS DBParameterGroups
* Fix mocking of RDS DBSecurityGroupIngress rules
* Make mocking of RDS OptionGroupOptions more accurate
* Fix mocking of RDS cross-region DB replication
* Add RDS tag support to:
  * DBs
  * DBSubnetGroups
  * DBSecurityGroups

Signed-off-by: Andrew Garrett <andrew.garrett@getbraintree.com>
2017-01-11 21:02:51 -05:00
Mike Fuller
618c2a7013 Turned off tests on python 3 2015-01-30 19:28:07 +11:00
Mike Fuller
0d958e9b1c Added read replica support 2015-01-30 17:12:51 +11:00
Mike Fuller
42ab9312bb Added db_subnet_group support 2015-01-30 08:18:15 +11:00
Mike Fuller
8614b50898 Added DB Security Group Create/List/Delete/Authorize 2015-01-29 17:25:39 +11:00
Mike Fuller
884bd51604 Added tests add/remove/list tags on option groups 2015-01-29 07:24:03 +11:00
Mike Fuller
e42046aeda extended the list/add/delete tags functions to support more resource types. 2015-01-29 07:15:03 +11:00
Mike Fuller
10c0ffc2f2 Added remove_tags_from_resource for rds db and add_tags_to_resource for rds db. 2015-01-28 10:17:55 +11:00
Chris Henry
9e2a577324 Tweak tests. 2015-01-27 01:59:55 -05:00
Mike Fuller
2dde94c9be Storing tags on create db instance and getting tags back in list_tags_for_resource 2015-01-27 09:04:39 +11:00
Mike Fuller
6232abfe2d Added reboot instance and list_tags_for_resource. Still need to get the tags populated. 2015-01-27 08:21:48 +11:00
Chris Henry
bcf4e97752 Uncomment existing subnet groups test and add more assertions. 2015-01-26 15:39:34 -05:00
Mike Fuller
242e29a7c1 rds2 modify_db_instance, small code tidy ups 2015-01-22 07:21:49 +11:00
Mike Fuller
6fad81aabf I have delete options for the modify_option_group method but for the life of me. I cannot work out how to use this function to add options to an option_group. 2015-01-21 07:15:47 +11:00
Mike Fuller
dfb33aaad3 Started implementing modify_option_group. 2015-01-20 21:01:34 +11:00
Mike Fuller
a43b002c3a Added describe_option_group_options. 2015-01-20 07:18:52 +11:00
Mike Fuller
503d46d36a Added decribe_option_groups and delete_option_group support 2015-01-19 20:29:32 +11:00
Mike Fuller
40db44f2cd Added Exceptions on create_option_group 2015-01-19 17:03:14 +11:00
Mike Fuller
c6437930de fixed up tests for create_option_group, fixed return json to have major_version correct 2015-01-19 08:06:37 +11:00
Mike Fuller
8c16517f10 building out new RDS2 Mock.
completed:
 * create_db_instance()
 * create_option_group()
2015-01-19 07:38:10 +11:00