<?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: SDK 5.1 Python in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/SDK-5-1-Python/m-p/37870#M336</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I'm having the same problem with the tag not being set correctly with SDK 5.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible to retrieve up to 100 records at a time by setting the max-records to 100 like:&lt;/P&gt;&lt;P&gt;vol_get_iter.child_add_string("max-records",100)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that's hardly a proper fix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone from Netapp can chime in on this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Evan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Oct 2013 03:34:38 GMT</pubDate>
    <dc:creator>EFRASER</dc:creator>
    <dc:date>2013-10-02T03:34:38Z</dc:date>
    <item>
      <title>SDK 5.1 Python</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/SDK-5-1-Python/m-p/37864#M335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use volume-get-iter (without max-records set) with Python SDK, a snippet of the code is as follows and is very similar to the vollist.pl that is given out with the PERL SDK:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tag = "NULL"&lt;/P&gt;&lt;P&gt;while tag:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; vol_get_iter = NaElement("volume-get-iter")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if tag != "NULL":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vol_get_iter.child_add_string("tag",tag)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; out = s.invoke_elem(vol_get_iter)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; tag = out.child_get_string("next-tag")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; vol_list = out.child_get("attributes-list").children_get()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue with the above is if I have more than 20 volumes in my c-mode cluster it only outputs 20, and the tag for the "next-tag" is not being set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:06:52 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/SDK-5-1-Python/m-p/37864#M335</guid>
      <dc:creator>NIGOSHIKE</dc:creator>
      <dc:date>2025-06-05T06:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: SDK 5.1 Python</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/SDK-5-1-Python/m-p/37870#M336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I'm having the same problem with the tag not being set correctly with SDK 5.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible to retrieve up to 100 records at a time by setting the max-records to 100 like:&lt;/P&gt;&lt;P&gt;vol_get_iter.child_add_string("max-records",100)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that's hardly a proper fix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone from Netapp can chime in on this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Evan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 03:34:38 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/SDK-5-1-Python/m-p/37870#M336</guid>
      <dc:creator>EFRASER</dc:creator>
      <dc:date>2013-10-02T03:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: SDK 5.1 Python</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/SDK-5-1-Python/m-p/37875#M337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Evan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your problem is with the Python SDK as well, there are a few gotchas you need to be aware of. First, you must XML escape the &lt;SPAN style="font-family: courier new,courier;"&gt;next-tag&lt;/SPAN&gt; value before executing the next iteration. Second, if you're reusing the same &lt;SPAN style="font-family: courier new,courier;"&gt;NaElement&lt;/SPAN&gt; API object to execute the next iteration, you must update the value of the &lt;SPAN style="font-family: courier new,courier;"&gt;tag NaElement&lt;/SPAN&gt; using the &lt;SPAN style="font-family: courier new,courier;"&gt;NaElement.set_content()&lt;/SPAN&gt; method on the third and subsequent iterations, as calling &lt;SPAN style="font-family: courier new,courier;"&gt;api.child_add_string("tag", next_tag)&lt;/SPAN&gt; a second time will append a new copy of the &lt;SPAN style="font-family: courier new,courier;"&gt;tag&lt;/SPAN&gt; child object under the API object rather than updating the value of the existing &lt;SPAN style="font-family: courier new,courier;"&gt;tag &lt;/SPAN&gt;object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if the abbreviated code example below gets you going. If you're still running into problems, please post some more details and a short code example so we can help further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13807284766366728" jivemacro_uid="_13807284766366728"&gt;&lt;P&gt;api = NaElement("volume-get-iter")&lt;/P&gt;&lt;P&gt;output = server.invoke_elem(api)&lt;/P&gt;&lt;P&gt;print "OUTPUT:\n%s\n\n" % (output.sprintf())&lt;/P&gt;&lt;P&gt;next_tag = output.child_get_string("next-tag")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while next_tag is not None:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; next_tag = xml.sax.saxutils.escape(next_tag)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if api.child_get("tag") is None:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; api.child_add_string("tag", next_tag)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; api.child_get("tag").set_content(next_tag)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; output = server.invoke_elem(api)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; print "OUTPUT:\n%s\n\n" % (output.sprintf())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; next_tag = output.child_get_string("next-tag")&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 15:40:40 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/SDK-5-1-Python/m-p/37875#M337</guid>
      <dc:creator>zulanch</dc:creator>
      <dc:date>2013-10-02T15:40:40Z</dc:date>
    </item>
  </channel>
</rss>

