<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: python Rest Api 9.7 new user quota fails in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/python-Rest-Api-9-7-new-user-quota-fails/m-p/155886#M3036</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/851"&gt;@nicola_mendella&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like a bug.&lt;/P&gt;
&lt;P&gt;This is because the marshmallow schema for&amp;nbsp; QuotaReportUsersSchema doesn't allow postable field for name, even id.&lt;/P&gt;
&lt;P&gt;So you can modify quota_report_users.py in the library like&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;PRE style="background-color: #2b2b2b; color: #a9b7c6; font-family: 'JetBrains Mono'; font-size: 9,8pt;"&gt;&lt;SPAN style="color: #cc7832;"&gt;class &lt;/SPAN&gt;QuotaReportUsersSchema(ResourceSchema):&lt;BR /&gt;    &lt;SPAN style="color: #629755; font-style: italic;"&gt;"""The fields of the QuotaReportUsers object"""&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #629755; font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;    id = fields.Str(&lt;SPAN style="color: #aa4926;"&gt;data_key&lt;/SPAN&gt;=&lt;SPAN style="color: #6a8759;"&gt;"id"&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN style="color: #6a8759;"&gt;r""" Quota target user ID """&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;    name = fields.Str(&lt;SPAN style="color: #aa4926;"&gt;data_key&lt;/SPAN&gt;=&lt;SPAN style="color: #6a8759;"&gt;"name"&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN style="color: #6a8759;"&gt;r""" Quota target user name """&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN style="color: #bbb529;"&gt;@property&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN style="color: #cc7832;"&gt;def &lt;/SPAN&gt;&lt;SPAN style="color: #ffc66d;"&gt;resource&lt;/SPAN&gt;(&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;):&lt;BR /&gt;        &lt;SPAN style="color: #cc7832;"&gt;return &lt;/SPAN&gt;QuotaReportUsers&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN style="color: #bbb529;"&gt;@property&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN style="color: #cc7832;"&gt;def &lt;/SPAN&gt;&lt;SPAN style="color: #ffc66d;"&gt;patchable_fields&lt;/SPAN&gt;(&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;):&lt;BR /&gt;        &lt;SPAN style="color: #cc7832;"&gt;return &lt;/SPAN&gt;[&lt;BR /&gt;        ]&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN style="color: #bbb529;"&gt;@property&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN style="color: #cc7832;"&gt;def &lt;/SPAN&gt;&lt;SPAN style="color: #ffc66d;"&gt;postable_fields&lt;/SPAN&gt;(&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;):&lt;BR /&gt;        &lt;SPAN style="color: #cc7832;"&gt;return &lt;/SPAN&gt;[&lt;SPAN style="color: #6a8759;"&gt;'name'&lt;BR /&gt;&lt;/SPAN&gt;        ]&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 May 2020 14:42:44 GMT</pubDate>
    <dc:creator>francoisbnc</dc:creator>
    <dc:date>2020-05-04T14:42:44Z</dc:date>
    <item>
      <title>python Rest Api 9.7 new user quota fails</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/python-Rest-Api-9-7-new-user-quota-fails/m-p/155876#M3035</link>
      <description>&lt;P&gt;When trying to add a new user quota the error is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt; "users" is a required input for creating a user rule and "group" is not allowed&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The arguments passed are:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;newquota = QuotaRule(users=[{&lt;STRONG&gt;'name'&lt;/STRONG&gt;: linname}] , svm={&lt;STRONG&gt;'name' &lt;/STRONG&gt;: self.storage_controllers[self.site][&lt;STRONG&gt;'vserver'&lt;/STRONG&gt;]}, volume={&lt;STRONG&gt;'name'&lt;/STRONG&gt;:&lt;STRONG&gt;'vol_users'&lt;/STRONG&gt;}, qtree={&lt;STRONG&gt;'name'&lt;/STRONG&gt;:&lt;STRONG&gt;'users'&lt;/STRONG&gt;}, type=&lt;STRONG&gt;'user'&lt;/STRONG&gt;,user_mapping=&lt;STRONG&gt;"off"&lt;/STRONG&gt;, space={&lt;STRONG&gt;'hard_limit'&lt;/STRONG&gt;:new_quota_size})&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;From what i can see seems that the variable is not passed to the api request.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Python 3.6&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;netapp-ontap 9.7.2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Modify quotas works as expected.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Any suggestion ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 11:11:10 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/python-Rest-Api-9-7-new-user-quota-fails/m-p/155876#M3035</guid>
      <dc:creator>nicola_mendella</dc:creator>
      <dc:date>2025-06-04T11:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: python Rest Api 9.7 new user quota fails</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/python-Rest-Api-9-7-new-user-quota-fails/m-p/155886#M3036</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/851"&gt;@nicola_mendella&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like a bug.&lt;/P&gt;
&lt;P&gt;This is because the marshmallow schema for&amp;nbsp; QuotaReportUsersSchema doesn't allow postable field for name, even id.&lt;/P&gt;
&lt;P&gt;So you can modify quota_report_users.py in the library like&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;PRE style="background-color: #2b2b2b; color: #a9b7c6; font-family: 'JetBrains Mono'; font-size: 9,8pt;"&gt;&lt;SPAN style="color: #cc7832;"&gt;class &lt;/SPAN&gt;QuotaReportUsersSchema(ResourceSchema):&lt;BR /&gt;    &lt;SPAN style="color: #629755; font-style: italic;"&gt;"""The fields of the QuotaReportUsers object"""&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #629755; font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;    id = fields.Str(&lt;SPAN style="color: #aa4926;"&gt;data_key&lt;/SPAN&gt;=&lt;SPAN style="color: #6a8759;"&gt;"id"&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN style="color: #6a8759;"&gt;r""" Quota target user ID """&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;    name = fields.Str(&lt;SPAN style="color: #aa4926;"&gt;data_key&lt;/SPAN&gt;=&lt;SPAN style="color: #6a8759;"&gt;"name"&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN style="color: #6a8759;"&gt;r""" Quota target user name """&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN style="color: #bbb529;"&gt;@property&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN style="color: #cc7832;"&gt;def &lt;/SPAN&gt;&lt;SPAN style="color: #ffc66d;"&gt;resource&lt;/SPAN&gt;(&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;):&lt;BR /&gt;        &lt;SPAN style="color: #cc7832;"&gt;return &lt;/SPAN&gt;QuotaReportUsers&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN style="color: #bbb529;"&gt;@property&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN style="color: #cc7832;"&gt;def &lt;/SPAN&gt;&lt;SPAN style="color: #ffc66d;"&gt;patchable_fields&lt;/SPAN&gt;(&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;):&lt;BR /&gt;        &lt;SPAN style="color: #cc7832;"&gt;return &lt;/SPAN&gt;[&lt;BR /&gt;        ]&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN style="color: #bbb529;"&gt;@property&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN style="color: #cc7832;"&gt;def &lt;/SPAN&gt;&lt;SPAN style="color: #ffc66d;"&gt;postable_fields&lt;/SPAN&gt;(&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;):&lt;BR /&gt;        &lt;SPAN style="color: #cc7832;"&gt;return &lt;/SPAN&gt;[&lt;SPAN style="color: #6a8759;"&gt;'name'&lt;BR /&gt;&lt;/SPAN&gt;        ]&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 14:42:44 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/python-Rest-Api-9-7-new-user-quota-fails/m-p/155886#M3036</guid>
      <dc:creator>francoisbnc</dc:creator>
      <dc:date>2020-05-04T14:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: python Rest Api 9.7 new user quota fails</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/python-Rest-Api-9-7-new-user-quota-fails/m-p/156097#M3038</link>
      <description>&lt;P&gt;Thank You. This solved the issue.&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 06:41:26 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/python-Rest-Api-9-7-new-user-quota-fails/m-p/156097#M3038</guid>
      <dc:creator>nicola_mendella</dc:creator>
      <dc:date>2020-05-10T06:41:26Z</dc:date>
    </item>
  </channel>
</rss>

