<?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: OnTAPI volume-get-iter returns with errors in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/OnTAPI-volume-get-iter-returns-with-errors/m-p/111790#M1651</link>
    <description>&lt;P&gt;OK. I knew about the next-tag but was just surprised by getting unprocessed xml entities from ApiTest.&lt;/P&gt;&lt;P&gt;I found the bug in my code, wrong scoping for the return value from&amp;nbsp;na_server_invoke.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Oct 2015 10:30:38 GMT</pubDate>
    <dc:creator>ADRIAN_PYBUS</dc:creator>
    <dc:date>2015-10-27T10:30:38Z</dc:date>
    <item>
      <title>OnTAPI volume-get-iter returns with errors</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/OnTAPI-volume-get-iter-returns-with-errors/m-p/111554#M1646</link>
      <description>&lt;P&gt;At customer site:&lt;/P&gt;&lt;P&gt;When iterating through the tags for volume-get-iter we get strange errors.&lt;/P&gt;&lt;P&gt;E.g. returned by na_results_errno and na_results_reason after na_server_invoke:&lt;/P&gt;&lt;P&gt;Error:&lt;STRONG&gt;13001, PCDATA invalid Char value 18 . &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Error:&lt;STRONG&gt;1, Extra content at the end of the document . &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We asked the customer to run the ApiTest pgm with&amp;nbsp;&lt;SPAN&gt;volume-get-iter to see if there was something strange in their settings.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There was:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;results status="passed"&amp;gt;&lt;BR /&gt;&amp;lt;attributes-list&amp;gt;&lt;BR /&gt;&amp;lt;volume-attributes&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;... (20 volumes elided)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/volume-attributes&amp;gt;&lt;BR /&gt;&amp;lt;/attributes-list&amp;gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;lt;next-tag&amp;gt;&amp;amp;lt;volume-get-iter-key-td&amp;amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;amp;lt;key-0&amp;amp;gt;CIFS&amp;amp;lt;/key-0&amp;amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;amp;lt;key-1&amp;amp;gt;veeam_repo1&amp;amp;lt;/key-1&amp;amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;amp;lt;/volume-get-iter-key-td&amp;amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;lt;/next-tag&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&amp;lt;num-records&amp;gt;20&amp;lt;/num-records&amp;gt;&lt;BR /&gt;&amp;lt;/results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The text in bold seems to be garabage. I have not been able to reproduce this behavior in our lab.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any input on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adrian&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2015 15:29:44 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/OnTAPI-volume-get-iter-returns-with-errors/m-p/111554#M1646</guid>
      <dc:creator>ADRIAN_PYBUS</dc:creator>
      <dc:date>2015-10-22T15:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: OnTAPI volume-get-iter returns with errors</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/OnTAPI-volume-get-iter-returns-with-errors/m-p/111582#M1647</link>
      <description>&lt;P&gt;The &amp;lt;next-tag&amp;gt; data is certainly not garbage, although it's not designed for human consumption. &amp;nbsp;You requested 20 records in your query (default, see max-records if you want to request more) but there are more than 20 records that match your query so the output has been "paged". &amp;nbsp;&amp;lt;next-tag&amp;gt; is the pointer to the next&amp;nbsp;page of results, which you can feed back into another volume-get-iter as the "tag" input. &amp;nbsp;As long as you have a &amp;lt;next-tag&amp;gt; returned, you still have more results to process. &amp;nbsp;If there is no &amp;lt;next-tag&amp;gt;, you have fetched all your records. &amp;nbsp;All *-iter APIs should support max-records and tag/next-tag.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So that doesn't solve your real issue but hopefully you understand what &amp;lt;next-tag&amp;gt; is now.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2015 18:57:14 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/OnTAPI-volume-get-iter-returns-with-errors/m-p/111582#M1647</guid>
      <dc:creator>wh_slayer</dc:creator>
      <dc:date>2015-10-22T18:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: OnTAPI volume-get-iter returns with errors</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/OnTAPI-volume-get-iter-returns-with-errors/m-p/111790#M1651</link>
      <description>&lt;P&gt;OK. I knew about the next-tag but was just surprised by getting unprocessed xml entities from ApiTest.&lt;/P&gt;&lt;P&gt;I found the bug in my code, wrong scoping for the return value from&amp;nbsp;na_server_invoke.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2015 10:30:38 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/OnTAPI-volume-get-iter-returns-with-errors/m-p/111790#M1651</guid>
      <dc:creator>ADRIAN_PYBUS</dc:creator>
      <dc:date>2015-10-27T10:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: OnTAPI volume-get-iter returns with errors</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/OnTAPI-volume-get-iter-returns-with-errors/m-p/130682#M2348</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Same here by calling luns, have you resolvd this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 09:39:56 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/OnTAPI-volume-get-iter-returns-with-errors/m-p/130682#M2348</guid>
      <dc:creator>dsever</dc:creator>
      <dc:date>2017-05-02T09:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: OnTAPI volume-get-iter returns with errors</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/OnTAPI-volume-get-iter-returns-with-errors/m-p/130694#M2352</link>
      <description>&lt;P&gt;Here it something i wrote a while back (lil more than 4 years..) in perl.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#Collecting CDOT Volume Information and Storing in perl hash %volinfo:
    my $volapi = new NaElement('volume-get-iter');
    $volapi-&amp;gt;child_add_string('max-records','999');
        my $xi = new NaElement('query');
        $volapi-&amp;gt;child_add($xi);
        my $xi1 = new NaElement('volume-attributes');
        $xi-&amp;gt;child_add($xi1);
        my $xi3 = new NaElement('desired-attributes');
        $volapi-&amp;gt;child_add($xi3);
            my $xi4 = new NaElement('volume-attributes');
            $xi3-&amp;gt;child_add($xi4);
            my $xi5 = new NaElement('volume-id-attributes');
            $xi4-&amp;gt;child_add($xi5);
            my $xi6 = new NaElement('volume-state-attributes');
            $xi4-&amp;gt;child_add($xi6);
            my $xi7 = new NaElement('volume-space-attributes');
            $xi4-&amp;gt;child_add($xi7);
            my $xi8 = new NaElement('volume-inode-attributes');
            $xi4-&amp;gt;child_add($xi8);
    my $outv = $ss-&amp;gt;invoke_elem($volapi);
    if ($outv-&amp;gt;results_status() eq 'failed') {
        print ((caller(0))[3], $filer, $outv-&amp;gt;results_reason(), "\n");
    } else {
        my $nor = $outv-&amp;gt;child_get_string("num-records");
        if ($nor &amp;gt; 0 ) {
            my @volattr     = $outv-&amp;gt;child_get("attributes-list")-&amp;gt;children_get("volume-attributes");
            foreach my $vol (@volattr) {
                my $volidattr                           = $vol-&amp;gt;child_get("volume-id-attributes");
                my $volspattr                           = $vol-&amp;gt;child_get("volume-space-attributes");
                my $volstattr                           = $vol-&amp;gt;child_get("volume-state-attributes");
                my $volinattr                           = $vol-&amp;gt;child_get("volume-inode-attributes");
                if ($volidattr and $volstattr and $volspattr and $volinattr) {
                    my $volname                         = $volidattr-&amp;gt;child_get_string("name");
                    my $volid                           = join (":", $na, $volname);
                    $volinfo{$volid}{'volid'}           = $volid;
                    $volinfo{$volid}{'uuid'}            = $volidattr-&amp;gt;child_get_string("uuid");
                    $volinfo{$volid}{'name'}            = $volidattr-&amp;gt;child_get_string("name");
                    $volinfo{$volid}{'type'}            = $volidattr-&amp;gt;child_get_string("type");
                    $volinfo{$volid}{'containingAggr'}  = $volidattr-&amp;gt;child_get_string("containing-aggregate-name");
                    $volinfo{$volid}{'junctionPath'}    = $volidattr-&amp;gt;child_get_string("junction-path");
                    $volinfo{$volid}{'state'}           = $volstattr-&amp;gt;child_get_string("state");
                    $volinfo{$volid}{'sizeTotal'}       = $volspattr-&amp;gt;child_get_int("size-total");
                    $volinfo{$volid}{'sizeUsed'}        = $volspattr-&amp;gt;child_get_int("size-used");
                    $volinfo{$volid}{'sizeAvailable'}   = $volspattr-&amp;gt;child_get_int("size-available");
                    $volinfo{$volid}{'percentageUsed'}  = $volspattr-&amp;gt;child_get_int("percentage-size-used");
                    $volinfo{$volid}{'filesTotal'}      = $volinattr-&amp;gt;child_get_int("files-total");
                    $volinfo{$volid}{'filesUsed'}       = $volinattr-&amp;gt;child_get_int("files-used");
                    $volinfo{$volid}{'filer'}           = $filer;
                }
            }
        }
    }&lt;/PRE&gt;&lt;P&gt;hope this helps...&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 15:37:58 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/OnTAPI-volume-get-iter-returns-with-errors/m-p/130694#M2352</guid>
      <dc:creator>robinpeter</dc:creator>
      <dc:date>2017-05-02T15:37:58Z</dc:date>
    </item>
  </channel>
</rss>

