Changing Datatype maybe work in this case but I don't think this is right. I would suggest to use [int64] Data type.
- Changed API $quota_entry to powershell cmdlet "Get-NcQuota"
API 'quota-list-entries-iter' does return all the quota rules. The cmdlet Get-NcQuota internally calls this API itself, so its not different. The problem is with how the API was called. API response has a next-tag if the returned list is more than default(20). So the code need to iterate using this next tag to get the next set of values. The code wan't doing it and hence all the results were not returned.
The new version shall have this fix.
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Figured it out, but there may still be a bug or two to report here.
The command 'Set Quota' was failing because it was not being passed a quota policy name. I did notice that the workflow UI didn't present any quota policies in the dropdown list which was odd. But THEN I noticed that another cluster DID show values in the quota policy name dropdown list and Set Quota ran fne against that cluster. I confirmed both cluster and vservers did have the 'default' policies in place.
So I looked at the cm_storage_quota.quota_policy table (via MySQL WB) and noticed the 'cluster' name field had the simple cluster name on the cluster that was working and the cluster that was not working had a FQDN, or hq-stor.acme.com.
That I was sure was making the UI SQL fail to find a match. Then I noticed that I had inadvertently used a FQDN in the Quota Data Source for one cluster (the one failing) and not for the other one (which was working).
Changed them both to simple names, Reset the Scheme, re-acquired and things are working. So maybe two issues or bugs identified here:
1) The Quota 'Data Source' should probably not place fqdn's into the cluster name field .. because I believe they are always simple names in the cm_storage cluster table (though not sure)
2) It looks like the 'Set Quota' has a 'return' statement that should only be used inside a perl subroutine which I don't think exists (though I'm not a perl expert)