New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for setting minimum requested units in limit increase policy #2371
Conversation
aardvarq
commented
May 10, 2018
c7n/resources/account.py
Outdated
@@ -532,12 +533,15 @@ def process(self, resources): | |||
limit_exceeded = resources[0].get('c7n:ServiceLimitsExceeded', []) | |||
percent_increase = self.data.get('percent-increase') | |||
amount_increase = self.data.get('amount-increase') | |||
|
|||
minimum_increase = self.data.get('minimum-increase') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather than doing a check for if minimum-increase is None, you can just specify the default in the .get function itself, i.e. self.data.get('minimum-increase', 1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aha, indeed. Also, spelling counts, apparently ;-)
1st commit - omitted default value. Fixed |
|
@aardvarq the error is a linting one:
just remove the whitespace or line :) |
@aardvarq gently removes the somewhat liberal |
@aardvarq lgtm thanks for the pr, could you sign our contributor license agreement, referenced from the bottom of the project readme, direct link https://docs.google.com/forms/d/19LpBBjykHPox18vrZvBbZUcK6gQTj7qv1O5hCduAZFU/viewform |
done. Hope to file many more in the relatively near future. Thanks for the amazing work. |
…increase in requested units (cloud-custodian#2371)