Skip to content

Commit

Permalink
fixes #76 - default limits for EBS volume usage were in TiB not GiB, …
Browse files Browse the repository at this point in the history
…causing invalid default limits on accounts without Trusted Advisor
  • Loading branch information
jantman committed Oct 2, 2015
1 parent 72ffbc7 commit 95f2f2f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Pre-release (develop branch)
* `#63 <https://github.com/jantman/awslimitchecker/issues/63>`_ update Python usage documentation
* `#49 <https://github.com/jantman/awslimitchecker/issues/49>`_ clean up badges in README.rst and sphinx index.rst; PyPi downloads and version badges broken (switch to shields.io)
* `#67 <https://github.com/jantman/awslimitchecker/issues/67>`_ fix typo in required IAM policy; comma missing in list returned from `_Ec2Service.required_iam_permissions()`
* `#76 <https://github.com/jantman/awslimitchecker/issues/76>`_ default limits for EBS volume usage were in TiB not GiB, causing invalid default limits on accounts without Trusted Advisor

0.1.2 (2015-08-13)
------------------
Expand Down
6 changes: 3 additions & 3 deletions awslimitchecker/services/ebs.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def _get_limits_ebs(self):
limits['Provisioned IOPS (SSD) storage (GiB)'] = AwsLimit(
'Provisioned IOPS (SSD) storage (GiB)',
self,
20,
20480,
self.warning_threshold,
self.critical_threshold,
limit_type='AWS::EC2::Volume',
Expand All @@ -175,7 +175,7 @@ def _get_limits_ebs(self):
limits['General Purpose (SSD) volume storage (GiB)'] = AwsLimit(
'General Purpose (SSD) volume storage (GiB)',
self,
20,
20480,
self.warning_threshold,
self.critical_threshold,
limit_type='AWS::EC2::Volume',
Expand All @@ -184,7 +184,7 @@ def _get_limits_ebs(self):
limits['Magnetic volume storage (GiB)'] = AwsLimit(
'Magnetic volume storage (GiB)',
self,
20,
20480,
self.warning_threshold,
self.critical_threshold,
limit_type='AWS::EC2::Volume',
Expand Down
4 changes: 4 additions & 0 deletions awslimitchecker/tests/services/test_ebs.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,19 @@ def test_get_limits(self):
piops = limits['Provisioned IOPS']
assert piops.limit_type == 'AWS::EC2::Volume'
assert piops.limit_subtype == 'io1'
assert piops.default_limit == 40000
piops_tb = limits['Provisioned IOPS (SSD) storage (GiB)']
assert piops_tb.limit_type == 'AWS::EC2::Volume'
assert piops_tb.limit_subtype == 'io1'
assert piops_tb.default_limit == 20480
gp_tb = limits['General Purpose (SSD) volume storage (GiB)']
assert gp_tb.limit_type == 'AWS::EC2::Volume'
assert gp_tb.limit_subtype == 'gp2'
assert gp_tb.default_limit == 20480
mag_tb = limits['Magnetic volume storage (GiB)']
assert mag_tb.limit_type == 'AWS::EC2::Volume'
assert mag_tb.limit_subtype == 'standard'
assert mag_tb.default_limit == 20480
act_snaps = limits['Active snapshots']
assert act_snaps.limit_type == 'AWS::EC2::VolumeSnapshot'
act_vols = limits['Active volumes']
Expand Down

0 comments on commit 95f2f2f

Please sign in to comment.