-
Notifications
You must be signed in to change notification settings - Fork 45
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
Feature/extra summary #666
Feature/extra summary #666
Conversation
pkg/visor/hypervisor.go
Outdated
wg.Add(len(hv.visors)) | ||
|
||
i := 0 | ||
if hv.visor != nil { |
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.
Is there currently any possiblity of this code executing when hv.Visor
would be nil?
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.
Indeed there isn't. I took the code for getting visors and modified it to have additional info in response. However, we never start hypervisor without visor, except in tests. However, some tests rely on nil response on an "empty" hypervisor. Not sure if it's worth the trouble to change the tests and remove nil-checks everywhere.
This is working well. I would just remove the |
@Senyoret1 no other reasons besides just composing existing structures instead of declaring new ones. If you don't need that info it's no problem to avoid sending it. |
I checked and #699 contines working after the changes. |
Did you run
make format && make check
?Yes
Fixes #646
Changes:
GET /api//visors-summary
endpoint, allowing to fetch detailed information about each visorHow to test this PR:
Run a hypervisor with some visors and query
GET /api//visors-summary
.