little grave digging but better late than never
reason is quite simple - lack of info in SDK - I had hit the same wall when I was writing some tools for quota beeing feed up with Ontap WebGUI 😕
reason is: quota-users is only populated then you have user with default quota applied
when in etc/quotas you have entry then user quota-user is empty but instead quota-target contains user to whom you had entered specfic quota
and it is not the end ...of fun
I don't know that weed SDK developers smoke - but to access quota-users data you have to iterate not to child but to child of the child (I really cant think a reason why it is done this manner)
sorry for C# but it should be clear enough
if (quoInfo.GetChildByName("quota-target") != null)
{
if (quoInfo.GetChildByName("quota-users") != null)
{
NaElement targetElem = quoInfo.GetChildByName("quota-users");
System.Collections.IList users = targetElem.GetChildren();
System.Collections.IEnumerator usersIter = users.GetEnumerator();
while (usersIter.MoveNext())
{
NaElement usersInfo = (NaElement)usersIter.Current;
if (usersInfo.GetChildByName("quota-user-name") != null)
{
Console.Write(usersInfo.GetChildContent("quota-user-name") + "\t");
}
}
}
}
Hope it helps someone