Skip to content

Commit

Permalink
fixes #62 - fix bug in fix for #54
Browse files Browse the repository at this point in the history
  • Loading branch information
jantman committed Aug 13, 2015
1 parent a9266b9 commit ae37971
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 24 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Changelog
Pre-release (develop branch)
----------------------------

0.1.2 (2015-08-13)
------------------

* `#62 <https://github.com/jantman/awslimitchecker/issues/62>`_ - For 'RDS/DB snapshots per user' limit, only count manual snapshots. (fix bug in fix for `#54 <https://github.com/jantman/awslimitchecker/issues/54>`_)

0.1.1 (2015-08-13)
------------------

Expand Down
2 changes: 1 addition & 1 deletion awslimitchecker/services/rds.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def _find_usage_snapshots(self):
"DBSnapshots"]
num_manual_snaps = 0
for snap in snaps:
if snap['SnapshotType'] == 'automated':
if snap['SnapshotType'] == 'manual':
num_manual_snaps += 1
self.limits['DB snapshots per user']._add_current_usage(
num_manual_snaps,
Expand Down
23 changes: 1 addition & 22 deletions awslimitchecker/tests/services/test_rds.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,27 +391,6 @@ def test_find_usage_snapshots(self):
"DescribeDBSnapshotsResponse": {
"DescribeDBSnapshotsResult": {
"DBSnapshots": [
{
"AllocatedStorage": 50,
"AvailabilityZone": "us-east-1a",
"DBInstanceIdentifier": "bd1c1ub84tcj0cv",
"DBSnapshotIdentifier":
"dbsnap-1",
"Engine": "mysql",
"EngineVersion": "5.6.22",
"InstanceCreateTime": 1429902229.795,
"Iops": None,
"LicenseModel": "general-public-license",
"MasterUsername": "myuser",
"OptionGroupName": "default:mysql-5-6",
"PercentProgress": 100,
"Port": 3306,
"SnapshotCreateTime": 1429903945.169,
"SnapshotType": "manual",
"SourceRegion": None,
"Status": "available",
"VpcId": "vpc-1ee8937b"
},
{
"AllocatedStorage": 100,
"AvailabilityZone": "us-east-1a",
Expand Down Expand Up @@ -499,7 +478,7 @@ def test_find_usage_snapshots(self):

usage = sorted(cls.limits['DB snapshots per user'].get_current_usage())
assert len(usage) == 1
assert usage[0].get_value() == 2
assert usage[0].get_value() == 1
assert usage[0].aws_type == 'AWS::RDS::DBSnapshot'

def test_find_usage_param_groups(self):
Expand Down
2 changes: 1 addition & 1 deletion awslimitchecker/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import logging
logger = logging.getLogger(__name__)

_VERSION = '0.1.1'
_VERSION = '0.1.2'
_PROJECT_URL = 'https://github.com/jantman/awslimitchecker'


Expand Down

0 comments on commit ae37971

Please sign in to comment.