<?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: quota-report-iter no query filter accepted in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/quota-report-iter-no-query-filter-accepted/m-p/117142#M1868</link>
    <description>&lt;P&gt;Hi François,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your feedback, it seems that the additional element "quota" does the trick, with that it's not even necessary to specify the volume entity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;api1.set_vserver('test')
report = NaElement('quota-report-iter')
report.child_add(NaElement('max-records', maxrecords))
query = NaElement('query')
quota = NaElement('quota')
query.child_add(quota)
quota.child_add(NaElement('quota-target', 'test'))
report.child_add(query)
res = api1.invoke_elem(report)

for e in map(lambda x: (x.child_get_string('quota-target'), x.child_get_int('disk-limit')), res.child_get('attributes-list').children_get()):
      print e&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(u'test', 2048000)
(u'test', 3072000)
(u'test', 1024000)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Mar 2016 19:56:07 GMT</pubDate>
    <dc:creator>Michael_Lang</dc:creator>
    <dc:date>2016-03-16T19:56:07Z</dc:date>
    <item>
      <title>quota-report-iter no query filter accepted</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/quota-report-iter-no-query-filter-accepted/m-p/117092#M1866</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using OnTAP 8.3.1 to retrieve quota reports for infrastructure integration. Unfortunately the query element seems to be not working as expected. When specifying&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;api1.set_vserver('test')
report = NaElement('quota-report-iter')
report.child_add(NaElement('max-records', 5))
query = NaElement('query')
query.child_add(NaElement('quota-target', 'xxxx'))
report.child_add(query)
res = api1.invoke_elem(report)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;the query element is ignored completley where with ither iters (like storage-disk-get-iter) the build construct is working. I've been in contact with NetAPP support as I think, this is a Bug due to the result status/reason indicate a positive response but return a not correct result. In the example above the result would contain everything up to the first 5 records no matter what you specify in quota-target.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;does anyone has an idea how to query a quota-report for a specific quota-target instead of fetching all records and parsing them manually ? In our example this means 13 seconds waiting for retrieval of all entries ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advanced&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;Michael Lang&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 21:47:31 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/quota-report-iter-no-query-filter-accepted/m-p/117092#M1866</guid>
      <dc:creator>Michael_Lang</dc:creator>
      <dc:date>2025-06-04T21:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: quota-report-iter no query filter accepted</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/quota-report-iter-no-query-filter-accepted/m-p/117123#M1867</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let's try this&lt;/P&gt;&lt;PRE&gt;api = NaElement(&lt;SPAN&gt;"quota-report-iter"&lt;/SPAN&gt;)&lt;BR /&gt;api.child_add_string(&lt;SPAN&gt;"max-records"&lt;/SPAN&gt;,&lt;SPAN&gt;"5"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;xi = NaElement(&lt;SPAN&gt;"query"&lt;/SPAN&gt;)&lt;BR /&gt;api.child_add(xi)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;xi1 = NaElement(&lt;SPAN&gt;"quota"&lt;/SPAN&gt;)&lt;BR /&gt;xi.child_add(xi1)&lt;BR /&gt;&lt;BR /&gt;xi1.child_add_string(&lt;SPAN&gt;"quota-target"&lt;/SPAN&gt;,&lt;SPAN&gt;"*"&lt;/SPAN&gt;)&lt;BR /&gt;xi1.child_add_string(&lt;SPAN&gt;"volume"&lt;/SPAN&gt;,&lt;SPAN&gt;"test"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;xo = s.invoke_elem(api)&lt;BR /&gt;&lt;SPAN&gt;if &lt;/SPAN&gt;(xo.results_status() == &lt;SPAN&gt;"failed"&lt;/SPAN&gt;) :&lt;BR /&gt;    &lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"Error:&lt;/SPAN&gt;&lt;SPAN&gt;\n&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;print &lt;/SPAN&gt;(xo.sprintf())&lt;BR /&gt;    sys.exit (&lt;SPAN&gt;1&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;print &lt;/SPAN&gt;(&lt;SPAN&gt;"Received:&lt;/SPAN&gt;&lt;SPAN&gt;\n&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;print &lt;/SPAN&gt;(xo.sprintf())&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;François&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 13:40:08 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/quota-report-iter-no-query-filter-accepted/m-p/117123#M1867</guid>
      <dc:creator>francoisbnc</dc:creator>
      <dc:date>2016-03-16T13:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: quota-report-iter no query filter accepted</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/quota-report-iter-no-query-filter-accepted/m-p/117142#M1868</link>
      <description>&lt;P&gt;Hi François,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your feedback, it seems that the additional element "quota" does the trick, with that it's not even necessary to specify the volume entity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;api1.set_vserver('test')
report = NaElement('quota-report-iter')
report.child_add(NaElement('max-records', maxrecords))
query = NaElement('query')
quota = NaElement('quota')
query.child_add(quota)
quota.child_add(NaElement('quota-target', 'test'))
report.child_add(query)
res = api1.invoke_elem(report)

for e in map(lambda x: (x.child_get_string('quota-target'), x.child_get_int('disk-limit')), res.child_get('attributes-list').children_get()):
      print e&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(u'test', 2048000)
(u'test', 3072000)
(u'test', 1024000)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 19:56:07 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/quota-report-iter-no-query-filter-accepted/m-p/117142#M1868</guid>
      <dc:creator>Michael_Lang</dc:creator>
      <dc:date>2016-03-16T19:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: quota-report-iter no query filter accepted</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/quota-report-iter-no-query-filter-accepted/m-p/117155#M1870</link>
      <description>&lt;P&gt;small additional information here to be added,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for people using quota reporting on none enforced volumes for easier accumulation of space used by a specific user, quota-report-iter using a filter will not show such entries.&lt;/P&gt;&lt;P&gt;Meaning Volume1 has quota turned on but no limits and target equals "*" ... for that case you'll still need to fetch the complete report iter and filter manually&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="out_prompt_overlay prompt"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="output vbox"&gt;&lt;DIV class="hbox output_area"&gt;&lt;DIV class="box-flex1 output_subarea output_text output_stream output_stdout"&gt;&lt;PRE&gt;api1.set_vserver('')
report = NaElement('quota-report-iter')
report.child_add(NaElement('max-records', maxrecords))
query = NaElement('query')
quota = NaElement('quota')
query.child_add(quota)
quota.child_add(NaElement('quota-target', 'lang'))
report.child_add(query)
res = api1.invoke_elem(report)
print res.sprintf()&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;results status="passed"&amp;gt;
	&amp;lt;num-records&amp;gt;0&amp;lt;/num-records&amp;gt;
&amp;lt;/results&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where retrieving all items without filter will provide expected entries&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;api1.set_vserver('')
QReports = QuotaReportCollector(from_api=api1.invoke(*['quota-report-iter', 'max-records', maxrecords]).child_get('attributes-list'))
map(str, QReports.get_report(target='lang'))&lt;/PRE&gt;&lt;PRE&gt;['&amp;lt;quota disk_limit="-" disk_used="1" file_limit="-" files_used="136" type="user" uid="lang" volume="vol1"/&amp;gt;',
 '&amp;lt;quota disk_limit="-" disk_used="76" file_limit="-" files_used="2485" type="user" uid="lang" volume="vol2"/&amp;gt;',
 '&amp;lt;quota disk_limit="-" disk_used="10909" file_limit="-" files_used="106679" type="user" uid="lang" volume="vol3"/&amp;gt;',
 '&amp;lt;quota disk_limit="-" disk_used="21" file_limit="-" files_used="2" type="user" uid="lang" volume="vol4"/&amp;gt;',
 '&amp;lt;quota disk_limit="-" disk_used="279" file_limit="-" files_used="336" type="user" uid="lang" volume="vol5"/&amp;gt;',
 '&amp;lt;quota disk_limit="-" disk_used="10" file_limit="-" files_used="10" type="user" uid="lang" volume="vol6"/&amp;gt;']&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2016 06:35:26 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/quota-report-iter-no-query-filter-accepted/m-p/117155#M1870</guid>
      <dc:creator>Michael_Lang</dc:creator>
      <dc:date>2016-03-17T06:35:26Z</dc:date>
    </item>
  </channel>
</rss>

