Skip to content
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

Explicitly update or add doc comments denoting the unit of measurement #320

Open
atc0005 opened this issue Sep 15, 2021 · 0 comments
Open
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Sep 15, 2021

Example:

// DatastoreUsageSummary tracks usage details for a specific Datastore
type DatastoreUsageSummary struct {
Datastore mo.Datastore
StorageRemainingPercent float64
StorageUsedPercent float64
StorageTotal int64
StorageUsed int64
StorageRemaining int64
CriticalThreshold int
WarningThreshold int
}

I should note that each int64 field is using bytes as the unit of measurement (UOM). This matches the vSphere API:

freeSpace xsd:long Available space of this datastore, in bytes. The server periodically updates this value. It can be explicitly refreshed with the Refresh operation. This property is guaranteed to be valid only if accessible is true.

Other types (such as percentages used for WARNING and CRITICAL thresholds) should also be reviewed and annotated.

@atc0005 atc0005 added bug Something isn't working documentation Improvements or additions to documentation labels Sep 15, 2021
@atc0005 atc0005 added this to the Future milestone Sep 15, 2021
@atc0005 atc0005 self-assigned this Sep 15, 2021
@atc0005 atc0005 added enhancement New feature or request and removed bug Something isn't working labels Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant