Hello Team,
We've got a customer that believes there is a possible BUG within SDK in regards to quota rule creation. Whenever you request it to create one quota rule with a defined target, that single operation also creates a top-level volume quota rule that we didn't ask for.
In the output below, only the second rule was requested:
`Cluster::> volume quota policy rule show -volume vol_quota_test_sv2
Vserver: vserver1 Policy: default Volume: vol_quota_test_sv2
Soft Soft
User Disk Disk Files Files
Type Target Qtree Mapping Limit Limit Limit Limit Threshold
tree "" "" - - - - - -
tree q7g "" - - - - - -
2 entries were displayed.`
The issue appears to be SDK/API specific because it doesn't happen in CLI - in CLI, it creates just the rule you ask for, and nothing else.
Here's the minimal code to reproduce the issue:
`from netapp_ontap import config, HostConnection
from netapp_ontap.resources import QuotaRule, Qtree, Volume, Svm
hostname = "vserver1.financegroup.com"
username = ""
password = ""
config.CONNECTION = HostConnection(hostname, username, password)
volume_name = "vol_quota_test_sv2"
qtree_name = "q7g"
volume = Volume.find(name=volume_name)
svm = Svm.find(name=volume.svm.name)
qtree = Qtree.find(name=qtree_name, volume=volume.name)
quota_rule = QuotaRule.from_dict({
"svm": svm.to_dict(),
"volume": volume.to_dict(),
"type": "tree",
"qtree": qtree.to_dict(),
"disk_limit": 7516192768,
})
quota_rule.post()`
SDK versions that we've tried - 9.13.1.0 and 9.17.1.0 (the latest) - are both affected.