-
Notifications
You must be signed in to change notification settings - Fork 21
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
(feat) Add lvm volumegroup describe feature #75
Conversation
Signed-off-by: Harsh Vardhan <harsh.vardhan@mayadata.io>
Signed-off-by: Harsh Vardhan <harsh.vardhan@mayadata.io>
{Cells: []interface{}{"pool-1", "node1", "174 GiB", "188 GiB", false, int32(2), int32(2), "ONLINE"}}, | ||
{Cells: []interface{}{"pool-2", "node2", "174 GiB", "188 GiB", false, int32(2), int32(2), "ONLINE"}}}, | ||
{Cells: []interface{}{"pool-1", "node1", "174.0GiB", "188.1GiB", false, int32(2), int32(2), "ONLINE"}}, | ||
{Cells: []interface{}{"pool-2", "node2", "174.0GiB", "188.1GiB", false, int32(2), int32(2), "ONLINE"}}}, |
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.
I've made these changes to make sure that the unit-tests are all green, I'll revert nonsense updates like changing of 174.0GiB
back to 174GiB
after making sure no unit-tests fail in the entire project.
if err != nil { | ||
return value | ||
} | ||
return units.BytesSize(float64(iBytes)) | ||
return units.CustomSize("%.1f%s", float64(bytes), 1024.0, []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"}) |
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.
Need to find a better format specifier such that 1024 bytes show up as 1KiB
and not 1.0KiB
.
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.
Maybe upto 2 decimal place is a better precision.
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.
LGTM
if err != nil { | ||
return value | ||
} | ||
return units.BytesSize(float64(iBytes)) | ||
return units.CustomSize("%.1f%s", float64(bytes), 1024.0, []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"}) |
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.
Maybe upto 2 decimal place is a better precision.
I'll do it in upcoming PRs, this would need some digging around format specifiers. |
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.
LGTM
Signed-off-by: Harsh Vardhan harsh.vardhan@mayadata.io