-
Notifications
You must be signed in to change notification settings - Fork 11
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
[API Update & Refactor] ELB #522
base: devel
Are you sure you want to change the base?
Conversation
@@ -15,8 +15,9 @@ func TestIpGroupList(t *testing.T) { | |||
client, err := clients.NewElbV3Client() | |||
th.AssertNoErr(t, err) | |||
|
|||
listOpts := ipgroups.ListOpts{} | |||
ipgroupsList, err := ipgroups.List(client, listOpts) | |||
ipgroupsLists, err := ipgroups.List(client, ipgroups.ListOpts{}).AllPages() |
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.
why extract here? Previously it works without it
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.
All List API returned with pageinfo should warp with Page
|
||
listOpts := ipgroups.ListOpts{} | ||
ipGroupsSlice, err := ipgroups.List(client, listOpts) | ||
ipGroupsSlices, err := ipgroups.List(client, ipgroups.ListOpts{}).AllPages() |
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.
extract and paging should be inside list func
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.
why you change that?
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.
same
@@ -18,7 +18,7 @@ func TestLoadBalancerList(t *testing.T) { | |||
loadbalancerPages, err := loadbalancers.List(client, listOpts).AllPages() |
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.
extract and paging should be inside list func again
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.
currently no. have to change how the Page struct works.
|
||
listPolicy, err := security_policy.List(client, listOpts) | ||
allPolicies, err := security_policy.ExtractSecurities(allPages) |
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.
again extract outside of the function
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 will try, but it is a huge modification for all functions using Page.
fix #512