-
Notifications
You must be signed in to change notification settings - Fork 925
DimesionData: Generic pagination, anti-affinity rules, create firewall expansion #726
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
Conversation
|
|
||
| rules = [] | ||
| for result in paged_result: | ||
| rules.extend(self._to_anti_affinity_rules(result)) |
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.
would probably be quicker to use list comprehension here
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.
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.
|
changes look good. once tests are supporting I will test and merge. |
| """ | ||
| def __init__(self, id, node_list): | ||
| self.id = id | ||
| self.node_list = node_list |
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.
Can you docstring what this does/type etc please.
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.
Whoops missed that one
|
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 |
|
thanks LGTM |
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.