-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Expose serial number and bus type via GuestOsInfo #10970
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2215,13 +2215,20 @@ type VirtualMachineInstanceFileSystemList struct { | |
Items []VirtualMachineInstanceFileSystem `json:"items"` | ||
} | ||
|
||
// VirtualMachineInstanceFileSystemDisk represents the guest os FS disks | ||
type VirtualMachineInstanceFileSystemDisk struct { | ||
Serial string `json:"serial"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @alromeros is this ever expected to be empty? I would be pretty surprised There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think BusType will never be empty, but Serial is optional: https://qemu-project.gitlab.io/qemu/interop/qemu-ga-ref.html#qapidoc-146. |
||
BusType string `json:"bus-type"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does break convention, it should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @xpivarc Thanks for the heads up! this check must be automated somehow, it is something hard to remember for the long term. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can make the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I will fix it to avoid breaking the convention. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assumed we wanted to expose with exact naming naming scheme as libvirt There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah me too. It prevents adding some unnecessary code, but I guess it's odd to only add the exception to BusType. |
||
} | ||
|
||
// VirtualMachineInstanceFileSystem represents guest os disk | ||
type VirtualMachineInstanceFileSystem struct { | ||
DiskName string `json:"diskName"` | ||
MountPoint string `json:"mountPoint"` | ||
FileSystemType string `json:"fileSystemType"` | ||
UsedBytes int `json:"usedBytes"` | ||
TotalBytes int `json:"totalBytes"` | ||
DiskName string `json:"diskName"` | ||
MountPoint string `json:"mountPoint"` | ||
FileSystemType string `json:"fileSystemType"` | ||
UsedBytes int `json:"usedBytes"` | ||
TotalBytes int `json:"totalBytes"` | ||
Disk []VirtualMachineInstanceFileSystemDisk `json:"disk,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this a slice? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I got the explanation here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That doesn't explain the question, @alromeros can you elaborate? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are storing here the guest agent response to the |
||
} | ||
|
||
// FreezeUnfreezeTimeout represent the time unfreeze will be triggered if guest was not unfrozen by unfreeze command | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 it safe to just assign it like that w/o iterating and running
append
to the list you create with amake
?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.
Yeah I think it's safe to just assign slices