Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gianncarlo Giannattasio committed Mar 20, 2024
1 parent b2c9c83 commit 22995a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c7n/resources/vpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2912,7 +2912,7 @@ class SubnetIpAllocationFilter(Filter):
def calculate_ip_allocation(self, subnet):
subnetMask = subnet.get('CidrBlock').split('/')[1]
hostBits = 32 - int(subnetMask)
totalHost = (2 ** hostBits) - 2
totalHost = ((2 ** hostBits) - 2)
availableHost = subnet.get('AvailableIpAddressCount')
ipsUsed = totalHost - availableHost
percentageOfIpsUsed = (ipsUsed / totalHost) * 100
Expand Down

0 comments on commit 22995a5

Please sign in to comment.