Skip to content

Conversation

@jadunham1
Copy link
Contributor

Added:
ex_list_anti_affinity_rules
ex_create_anti_affinity_rule
ex_delete_anti_affinity_rule
generic pagination function
modified ex_create_firewall_rule to be able to place rules in a specific position relative to another rule

Tests for all new added features
Added some more coverage tests to ex_create_firewall rule
97% coverage in our compute driver now.


rules = []
for result in paged_result:
rules.extend(self._to_anti_affinity_rules(result))
Copy link
Contributor

Choose a reason for hiding this comment

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

would probably be quicker to use list comprehension here

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 Think since our to methods are returning lists here themselves extend makes more sense than list comprehension. If you have a better way let me know because all of our functions will have the same type of style in them so we should get it right the first time.

@tonybaloney
Copy link
Contributor

changes look good. once tests are supporting I will test and merge.

@jadunham1 jadunham1 changed the title [WIP] DimesionData: Generic pagination, anti-affinity rules, create firewall expansion DimesionData: Generic pagination, anti-affinity rules, create firewall expansion Mar 24, 2016
"""
def __init__(self, id, node_list):
self.id = id
self.node_list = node_list
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you docstring what this does/type etc please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops missed that one

@tonybaloney
Copy link
Contributor

Excellent changes, great to see some improvement in the tests as well. We'll need this in a few weeks when the 2.2 API comes out. Only 1 small change about docstring then we're good to merge

@tonybaloney
Copy link
Contributor

thanks LGTM

@asfgit asfgit closed this in 03733cc Mar 26, 2016
asfgit pushed a commit that referenced this pull request Mar 26, 2016
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.

2 participants