<?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 ONTAP 9.7 Rest API QuotaRule Python Libraries in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ONTAP-9-7-Rest-API-QuotaRule-Python-Libraries/m-p/160037#M3091</link>
    <description>&lt;P&gt;Trying to add a new user rule and getting the following error, what am I missing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File "/usr/local/lib/python3.8/dist-packages/netapp_ontap/resource.py", line 191, in __getattribute__&lt;BR /&gt;raise AttributeError(&lt;BR /&gt;AttributeError: The 'svm' field has not been set on the QuotaRule. Try refreshing the object by calling get().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the sample code&lt;/P&gt;
&lt;P&gt;from netapp_ontap import config&lt;BR /&gt;from netapp_ontap import HostConnection&lt;BR /&gt;from netapp_ontap.resources import QuotaRule&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;with HostConnection("192.168.112.80", username="admin", password="****", verify=False):&lt;BR /&gt;resource = QuotaRule()&lt;BR /&gt;resource.svm.name = "svm0"&lt;BR /&gt;resource.volume.name = "NFS2"&lt;BR /&gt;resource.type = "user"&lt;BR /&gt;resource.users = [{"name": "fred2"}]&lt;BR /&gt;resource.qtree.name = "qt1"&lt;BR /&gt;resource.user_mapping = "off"&lt;BR /&gt;resource.space.hard_limit = 8192&lt;BR /&gt;resource.space.soft_limit = 1024&lt;BR /&gt;resource.files.hard_limit = 20&lt;BR /&gt;resource.files.soft_limit = 10&lt;BR /&gt;resource.post(hydrate=True)&lt;BR /&gt;print(resource)&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 10:50:43 GMT</pubDate>
    <dc:creator>kramar</dc:creator>
    <dc:date>2025-06-04T10:50:43Z</dc:date>
    <item>
      <title>ONTAP 9.7 Rest API QuotaRule Python Libraries</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ONTAP-9-7-Rest-API-QuotaRule-Python-Libraries/m-p/160037#M3091</link>
      <description>&lt;P&gt;Trying to add a new user rule and getting the following error, what am I missing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File "/usr/local/lib/python3.8/dist-packages/netapp_ontap/resource.py", line 191, in __getattribute__&lt;BR /&gt;raise AttributeError(&lt;BR /&gt;AttributeError: The 'svm' field has not been set on the QuotaRule. Try refreshing the object by calling get().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the sample code&lt;/P&gt;
&lt;P&gt;from netapp_ontap import config&lt;BR /&gt;from netapp_ontap import HostConnection&lt;BR /&gt;from netapp_ontap.resources import QuotaRule&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;with HostConnection("192.168.112.80", username="admin", password="****", verify=False):&lt;BR /&gt;resource = QuotaRule()&lt;BR /&gt;resource.svm.name = "svm0"&lt;BR /&gt;resource.volume.name = "NFS2"&lt;BR /&gt;resource.type = "user"&lt;BR /&gt;resource.users = [{"name": "fred2"}]&lt;BR /&gt;resource.qtree.name = "qt1"&lt;BR /&gt;resource.user_mapping = "off"&lt;BR /&gt;resource.space.hard_limit = 8192&lt;BR /&gt;resource.space.soft_limit = 1024&lt;BR /&gt;resource.files.hard_limit = 20&lt;BR /&gt;resource.files.soft_limit = 10&lt;BR /&gt;resource.post(hydrate=True)&lt;BR /&gt;print(resource)&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:50:43 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ONTAP-9-7-Rest-API-QuotaRule-Python-Libraries/m-p/160037#M3091</guid>
      <dc:creator>kramar</dc:creator>
      <dc:date>2025-06-04T10:50:43Z</dc:date>
    </item>
  </channel>
</rss>

