<?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: Qos Policy Delete Fails &amp;quot;entry does not exist&amp;quot; in ONTAP Rest API Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Qos-Policy-Delete-Fails-quot-entry-does-not-exist-quot/m-p/160398#M155</link>
    <description>&lt;P&gt;OK, now that I take another look at your latest output, I see that the Python library is not filling in the UUID as part of the URL. The problem here is that the YAML docs (partly from which the library is generated) for the qos endpoint are specified as thus:&lt;/P&gt;
&lt;P&gt;&lt;A class="nostyle" href="https://library.netapp.com/ecmdocs/ECMLP2862544/html/index.html#/storage/qos_policy_delete" target="_blank"&gt;&lt;SPAN&gt;/storage/qos/policies/{policy.uuid}&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So, the library is looking for a policy.uuid field to use as the key and not uuid. But the YAML docs are wrong (i.e. ONTAP isn't implemented that way) and need to be updated. This will be fixed when version 9.8.0rc1 of the library is released (will be released at the same time 9.8RC1 of ONTAP is generally available).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The workaround in the meantime is to use one of the methods below where you don't set the uuid directly but instead use find() or delete_collection().&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Oct 2020 21:54:21 GMT</pubDate>
    <dc:creator>RobertBlackhart</dc:creator>
    <dc:date>2020-10-19T21:54:21Z</dc:date>
    <item>
      <title>Qos Policy Delete Fails "entry does not exist"</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Qos-Policy-Delete-Fails-quot-entry-does-not-exist-quot/m-p/160387#M152</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Leveraging example to delete QoS policy from&amp;nbsp;&lt;A href="https://library.netapp.com/ecmdocs/ECMLP2858435/html/resources/qos_policy.html" target="_blank"&gt;https://library.netapp.com/ecmdocs/ECMLP2858435/html/resources/qos_policy.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hljs-keyword"&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; netapp_ontap &lt;/SPAN&gt;&lt;SPAN class="hljs-keyword"&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; HostConnection &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hljs-keyword"&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; netapp_ontap.resources &lt;/SPAN&gt;&lt;SPAN class="hljs-keyword"&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; QosPolicy &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hljs-keyword"&gt;with&lt;/SPAN&gt;&lt;SPAN&gt; HostConnection( &lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;"172.21.69.245"&lt;/SPAN&gt;&lt;SPAN&gt;, username=&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;"admin"&lt;/SPAN&gt;&lt;SPAN&gt;, password=&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;"password"&lt;/SPAN&gt;&lt;SPAN&gt;, verify=&lt;/SPAN&gt;&lt;SPAN class="hljs-keyword"&gt;False&lt;/SPAN&gt;&lt;SPAN&gt; &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;resource = QosPolicy(uuid=&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;"d38bafc0-5a51-11e9-bd5b-005056ac6f1f"&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;resource.delete(return_timeout=&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;returns the following error&lt;/P&gt;
&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "./qospolicy_get.py", line 7, in &amp;lt;module&amp;gt;&lt;BR /&gt;resource.delete(return_timeout=0)&lt;BR /&gt;File "/usr/local/lib/python3.8/dist-packages/netapp_ontap/resources/qos_policy.py", line 307, in delete&lt;BR /&gt;return super()._delete(&lt;BR /&gt;File "/usr/local/lib/python3.8/dist-packages/netapp_ontap/utils.py", line 50, in wrapper&lt;BR /&gt;return on_api_fail(error)&lt;BR /&gt;File "/usr/local/lib/python3.8/dist-packages/netapp_ontap/utils.py", line 72, in on_api_fail&lt;BR /&gt;raise NetAppRestError(cause=error) from None&lt;BR /&gt;netapp_ontap.error.NetAppRestError: Caused by HTTPError('404 Client Error: Not Found for url: &lt;A href="https://192.168.112.80:443/api/storage/qos/policies?return_timeout=0" target="_blank"&gt;https://192.168.112.80:443/api/storage/qos/policies?return_timeout=0&lt;/A&gt;'): entry doesn't exist&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:48:40 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Qos-Policy-Delete-Fails-quot-entry-does-not-exist-quot/m-p/160387#M152</guid>
      <dc:creator>kramar</dc:creator>
      <dc:date>2025-06-04T10:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Qos Policy Delete Fails "entry does not exist"</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Qos-Policy-Delete-Fails-quot-entry-does-not-exist-quot/m-p/160388#M153</link>
      <description>&lt;P&gt;That UUID that you tried is the same one from the example. I doubt that is the same as the one on your system. The 404 error is ONTAP saying that there is no resource at that location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should either do a get_collection() to iterate over all records to find the one that you want to delete, or you should use .find() with some query to find the single one you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since a QosPolicy has a name, using find() is probably the easiest way. You might write something like this:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;from netapp_ontap import HostConnection
from netapp_ontap.resources import QosPolicy

with HostConnection( "172.21.69.245", username="admin", password="password", verify=False):
    QosPolicy.find(name="myPolicyName").delete()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could alternatively use delete_collection() if you wanted to delete multiple with one call:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;from netapp_ontap import HostConnection
from netapp_ontap.resources import QosPolicy

with HostConnection( "172.21.69.245", username="admin", password="password", verify=False):
    QosPolicy.delete_collection(name="myPolicy*")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which would delete all QoS policies that had a name starting with "myPolicy".&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 20:41:20 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Qos-Policy-Delete-Fails-quot-entry-does-not-exist-quot/m-p/160388#M153</guid>
      <dc:creator>RobertBlackhart</dc:creator>
      <dc:date>2020-10-19T20:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Qos Policy Delete Fails "entry does not exist"</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Qos-Policy-Delete-Fails-quot-entry-does-not-exist-quot/m-p/160397#M154</link>
      <description>&lt;P&gt;Thanks David&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Was too lazy to post my actual code, I did use a QOS uuid that exists see below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;from netapp_ontap import HostConnection&lt;BR /&gt;from netapp_ontap.resources import QosPolicy&lt;/P&gt;
&lt;P&gt;with HostConnection(&lt;BR /&gt;"192.168.112.80", username="admin", password="*****", verify=False&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;resource = QosPolicy(uuid="aa663668-0e8f-11eb-9bc3-000c295dcee5")&lt;BR /&gt;resource.delete(return_timeout=0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "./qos_delete.py", line 8, in &amp;lt;module&amp;gt;&lt;BR /&gt;resource.delete(return_timeout=0)&lt;BR /&gt;File "/usr/local/lib/python3.8/dist-packages/netapp_ontap/resources/qos_policy.py", line 307, in delete&lt;BR /&gt;return super()._delete(&lt;BR /&gt;File "/usr/local/lib/python3.8/dist-packages/netapp_ontap/utils.py", line 50, in wrapper&lt;BR /&gt;return on_api_fail(error)&lt;BR /&gt;File "/usr/local/lib/python3.8/dist-packages/netapp_ontap/utils.py", line 72, in on_api_fail&lt;BR /&gt;raise NetAppRestError(cause=error) from None&lt;BR /&gt;netapp_ontap.error.NetAppRestError: Caused by HTTPError('404 Client Error: Not Found for url: &lt;A href="https://192.168.112.80:443/api/storage/qos/policies?return_timeout=0" target="_blank"&gt;https://192.168.112.80:443/api/storage/qos/policies?return_timeout=0&lt;/A&gt;'): entry doesn't exist&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cluster97::&amp;gt; qos policy-group show -fields policy-group,vserver,class,uuid&lt;BR /&gt;policy-group vserver uuid class&lt;BR /&gt;------------ ------- ------------------------------------ ------------&lt;BR /&gt;test svm0 aa663668-0e8f-11eb-9bc3-000c295dcee5 user-defined&lt;BR /&gt;test2 svm0 40d822ac-0e90-11eb-9bc3-000c295dcee5 user-defined&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However&amp;nbsp;&lt;/P&gt;
&lt;P&gt;QosPolicy.delete_collection(uuid="aa663668-0e8f-11eb-9bc3-000c295dcee5")&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does work, not sure why the python libraries do not like&lt;/P&gt;
&lt;P&gt;QosPolicy.delete(uuid="aa663668-0e8f-11eb-9bc3-000c295dcee5")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 21:46:10 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Qos-Policy-Delete-Fails-quot-entry-does-not-exist-quot/m-p/160397#M154</guid>
      <dc:creator>kramar</dc:creator>
      <dc:date>2020-10-19T21:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Qos Policy Delete Fails "entry does not exist"</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Qos-Policy-Delete-Fails-quot-entry-does-not-exist-quot/m-p/160398#M155</link>
      <description>&lt;P&gt;OK, now that I take another look at your latest output, I see that the Python library is not filling in the UUID as part of the URL. The problem here is that the YAML docs (partly from which the library is generated) for the qos endpoint are specified as thus:&lt;/P&gt;
&lt;P&gt;&lt;A class="nostyle" href="https://library.netapp.com/ecmdocs/ECMLP2862544/html/index.html#/storage/qos_policy_delete" target="_blank"&gt;&lt;SPAN&gt;/storage/qos/policies/{policy.uuid}&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So, the library is looking for a policy.uuid field to use as the key and not uuid. But the YAML docs are wrong (i.e. ONTAP isn't implemented that way) and need to be updated. This will be fixed when version 9.8.0rc1 of the library is released (will be released at the same time 9.8RC1 of ONTAP is generally available).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The workaround in the meantime is to use one of the methods below where you don't set the uuid directly but instead use find() or delete_collection().&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 21:54:21 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Qos-Policy-Delete-Fails-quot-entry-does-not-exist-quot/m-p/160398#M155</guid>
      <dc:creator>RobertBlackhart</dc:creator>
      <dc:date>2020-10-19T21:54:21Z</dc:date>
    </item>
  </channel>
</rss>

