Skip to content
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

Open
wants to merge 55 commits into
base: devel
Choose a base branch
from
Open

[API Update & Refactor] ELB #522

wants to merge 55 commits into from

Conversation

Aloento
Copy link
Member

@Aloento Aloento commented Apr 13, 2023

fix #512

@Aloento Aloento added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 13, 2023
@Aloento Aloento self-assigned this Apr 13, 2023
@Aloento Aloento changed the title ELB [Refactor] ELB Apr 13, 2023
@Aloento Aloento marked this pull request as ready for review May 10, 2023 09:50
@Aloento Aloento marked this pull request as draft May 10, 2023 09:50
@Aloento Aloento changed the title [Refactor] ELB [API Update & Refactor] ELB Jun 29, 2023
@Aloento Aloento marked this pull request as ready for review June 29, 2023 21:39
@@ -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()
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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


listOpts := ipgroups.ListOpts{}
ipGroupsSlice, err := ipgroups.List(client, listOpts)
ipGroupsSlices, err := ipgroups.List(client, ipgroups.ListOpts{}).AllPages()
Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

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

why you change that?

Copy link
Member Author

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()
Copy link
Member

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

Copy link
Member Author

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)
Copy link
Member

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

Copy link
Member Author

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.

@Aloento Aloento removed their assignment Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ELB] resources refactoring
2 participants