Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When trying to add a new user quota the error is:
"users" is a required input for creating a user rule and "group" is not allowed
The arguments passed are:
newquota = QuotaRule(users=[{'name': linname}] , svm={'name' : self.storage_controllers[self.site]['vserver']}, volume={'name':'vol_users'}, qtree={'name':'users'}, type='user',user_mapping="off", space={'hard_limit':new_quota_size})
From what i can see seems that the variable is not passed to the api request.
Python 3.6
netapp-ontap 9.7.2
Modify quotas works as expected.
Any suggestion ?
Solved! See The Solution
1 ACCEPTED SOLUTION
nicola_mendella has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @nicola_mendella ,
It looks like a bug.
This is because the marshmallow schema for QuotaReportUsersSchema doesn't allow postable field for name, even id.
So you can modify quota_report_users.py in the library like
class QuotaReportUsersSchema(ResourceSchema):
"""The fields of the QuotaReportUsers object"""
id = fields.Str(data_key="id")
r""" Quota target user ID """
name = fields.Str(data_key="name")
r""" Quota target user name """
@property
def resource(self):
return QuotaReportUsers
@property
def patchable_fields(self):
return [
]
@property
def postable_fields(self):
return ['name'
]
2 REPLIES 2
nicola_mendella has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @nicola_mendella ,
It looks like a bug.
This is because the marshmallow schema for QuotaReportUsersSchema doesn't allow postable field for name, even id.
So you can modify quota_report_users.py in the library like
class QuotaReportUsersSchema(ResourceSchema):
"""The fields of the QuotaReportUsers object"""
id = fields.Str(data_key="id")
r""" Quota target user ID """
name = fields.Str(data_key="name")
r""" Quota target user name """
@property
def resource(self):
return QuotaReportUsers
@property
def patchable_fields(self):
return [
]
@property
def postable_fields(self):
return ['name'
]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank You. This solved the issue.
