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
New generic API client for less code duplication #56
Conversation
20f02c5
to
36040de
Compare
Mirroring comment from @toothstone in internal ticket:
This might even be still in scope of this PR |
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.
Haven't looked at the pagination package yet
But here are some of my findings
In general i like the refactoring just a few things
also please adjust all errors so that they are not capitalized anymore.
2af1f33
to
23af55e
Compare
I think I addressed all your review comments and fixed them in one way or another. I also implemented filters on listing LBaaS backends as example (and for my tests). Oh right, I made all the examples to working, runnable tests - 73.5% coverage from only the examples already :) |
Sure will have another look |
f3b30b6
to
eef0226
Compare
eef0226
to
aacb872
Compare
Codecov Report
@@ Coverage Diff @@
## main #56 +/- ##
==========================================
+ Coverage 45.40% 53.88% +8.48%
==========================================
Files 76 82 +6
Lines 2938 3511 +573
==========================================
+ Hits 1334 1892 +558
- Misses 1271 1286 +15
Partials 333 333
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
be4c3c4
to
7985962
Compare
Adding a new generic API client which needs only a few lines of code per resource type to be usable with it. Gitmoji-marked as Refactoring and New Feature since it is a new feature allowing us to refactor everything and reduce code duplication.
This commit implements the new API client interfaces on LBaaS loadbalancer, backend and frontend.
7985962
to
0112f7e
Compare
Description
This PR adds a new generic API client only requiring a handful lines of code on an API resource to be compatible to it. It's inspired by the kubernetes client, but not completely following it.
Many people reviewing this would be appreciated, while it seems to work with the already implemented API resources, I'm not sure if it's generic enough for all our APIs.
Feedback on the usage interface of this new client is also appreciated, I have uploaded the docs for this branch to the webserver to my home router (it's a
wget -nH -m $godoc_server
and some nginx redirects).Release Note
Release note for CHANGELOG:
References
Community Note