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

goca: parse HostShare Datastores struct from HostXML.cc #6284

Closed
wants to merge 2 commits into from

Conversation

williamjoy
Copy link
Contributor

Allow parse extra data generated from:

host->xpaths<int>(ds_ids, "/HOST/HOST_SHARE/DATASTORES/DS/ID");
host->xpaths<long long>(ds_free, "/HOST/HOST_SHARE/DATASTORES/DS/FREE_MB");
for (size_t i = 0; i < ds_ids.size() && i < ds_free.size(); i++)
{
ds_free_disk[ds_ids[i]] = ds_free[i];
}


type Datastore struct {
ID int `xml:"ID,omitempty"`
TotalMB int `xml:"TOTAL_MB,omitempty"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in

TotalMB int `xml:"TOTAL_MB,omitempty"`
FreeMB int `xml:"FREE_MB,omitempty"`
UsedMB int `xml:"USED_MB,omitempty"`

FreeDisk int `xml:"FREE_DISK,omitempty"`
MaxDisk int `xml:"MAX_DISK,omitempty"`
UsedDisk int `xml:"USED_DISK,omitempty"`
Datastore Datastore `xml:"DS,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Host can have more then one datastore, so this line should be an array

Datastores []Datastore `xml:"DS,omitempty"`

@rsmontero
Copy link
Member

THANKS for the contribution. This has been merged as per 45a8543

@rsmontero rsmontero closed this Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants