#Python REST API cifs_share_acl issues, facing error when use post() to create new ACL (ONTAP 9.9.1)

1 messages · Page 1 of 1 (latest)

hybrid scarab
#

from netapp_ontap.resources import CifsShareAcl

new_cifs_share_acl = CifsShareAcl.from_dict({
'cifs_share.share': 'sharename',
'svm.uuid': 'xxxxxxxxx',
'user_or_group': 'BUILTIN\Administrators',
'permission': 'full_control',
})
CifsShareAcl.post(new_cifs_share_acl)

I'm trying to add new ACL on a cifs share by using the python code above, but it's showing the error as shown below.

netapp_ontap.error.NetAppRestError: Could not compute the location of the CifsShar
eAcl collection. Values for ['svm.uuid', 'cifs_share.share'] are required. Caused
by AttributeError("'CifsShareAcl' object has no attribute 'cifs_share'",)

Looks like it cannot input the key "sharename" into the dict
print(new_cifs_share_acl) :
CifsShareAcl({'user_or_group': 'BUILTIN\Administrators', 'svm': {'uuid': xxxxxxxxx'}, 'type': 'windows', 'permission': 'full_control'})

Anyone here can help?