-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add IPAM generic client bindings #114
base: main
Are you sure you want to change the base?
Conversation
return url.Parse("/api/ipam/v1/prefix.json") | ||
} | ||
|
||
func (p *Prefix) FilterAPIRequestBody(ctx context.Context) (interface{}, error) { |
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.
Method Prefix.FilterAPIRequestBody
has 6 return statements (exceeds 4 allowed).
"go.anx.io/go-anxcloud/pkg/utils/object/filter" | ||
) | ||
|
||
func (a *Address) EndpointURL(ctx context.Context) (*url.URL, error) { |
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.
Method Address.EndpointURL
has 5 return statements (exceeds 4 allowed).
Code Climate has analyzed commit 2579a39 and detected 3 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Extracted filter helper for objects into a separate PR #143 |
17e30e7
to
0cbdf16
Compare
0cbdf16
to
b49e5da
Compare
return url.Parse("/api/ipam/v1/prefix.json") | ||
} | ||
|
||
func (p *Prefix) FilterAPIRequestBody(ctx context.Context) (interface{}, error) { |
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.
Method Prefix.FilterAPIRequestBody
has 7 return statements (exceeds 4 allowed).
return url.Parse("/api/ipam/v1/prefix.json") | ||
} | ||
|
||
func (p *Prefix) FilterAPIRequestBody(ctx context.Context) (interface{}, error) { |
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.
Method Prefix.FilterAPIRequestBody
has 69 lines of code (exceeds 50 allowed). Consider refactoring.
return url.Parse("/api/ipam/v1/prefix.json") | ||
} | ||
|
||
func (p *Prefix) FilterAPIRequestBody(ctx context.Context) (interface{}, error) { |
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.
Method Prefix.FilterAPIRequestBody
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
This is the first iteration, providing most of the old address and prefix API. However, most of the important stuff is implemented. Unfortunately, it took me waaay to long to get to this state, mainly due to timeouts in the Engine and missing knowledge of the client internals. Although the tests can run mostly parallel, we might switch to a serial execution to ensure that the API isn't bombarded with endless requests. Co-authored-by: Mara Sophie Grosch <[email protected]> Ticket: SYSENG-923
b49e5da
to
2579a39
Compare
Description
Adds generic client bindings for the IPAM API.
Checklist
Unreleased
section in CHANGELOG.md, if user facing changeReferences
Community Note