Skip to content

Conversation

radix
Copy link
Contributor

@radix radix commented Sep 30, 2013

Bugs this should fix:
#209 - policy.update(...) breaks with changePercent-based policies
#207 - really make it possible to use desiredCapacity now. the previous branch didn't work because change was still required, which conflicts.

I somewhat significantly refactored the implementation of update_policy, since the boolean logic needed to be a bit more strict about when it would use data from the policy and when it would use data passed in. I wrote several unit tests for the behavior of updating policies between different types of change (change, changePercent, and desiredCapacity), as well as tests for maintaining that state when the update_policy call wasn't explicitly passed any change-related parameters.

In addition to the unit tests I've done some ad-hoc tests against the production Auto Scale service.

Christopher Armstrong and others added 3 commits September 30, 2013 17:50
- don't accidentally replace a changePercent with a change
- honor desired_capacity.
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 25604a9 on radeex:as-change-optional into ae3fc3b on rackspace:working.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.89%) when pulling 3356d58 on radeex:as-change-optional into ae3fc3b on rackspace:working.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean to use ascii_only= on all these -- I temporarily used it to make it easier to read my error messages. I'll change it back.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.89%) when pulling f0abb24 on radeex:as-change-optional into ae3fc3b on rackspace:working.

EdLeafe added a commit that referenced this pull request Oct 3, 2013
Make the "change" parameter optional for add_policy and update_policy methods
@EdLeafe EdLeafe merged commit 9600768 into pycontribs:working Oct 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants