<?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: got empty returned when invoke 'aggr-option-list-info' and other aggr API in Perl in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121720#M2033</link>
    <description>&lt;P&gt;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/8479"&gt;@asulliva﻿&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Asulliva,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your suggestion. It&amp;nbsp; perfectly solved my problem. I can get the specific value now. Thank you again.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jul 2016 01:40:41 GMT</pubDate>
    <dc:creator>wolfohyeah</dc:creator>
    <dc:date>2016-07-26T01:40:41Z</dc:date>
    <item>
      <title>got empty returned when invoke 'aggr-option-list-info' and other aggr API in Perl</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121145#M2002</link>
      <description>&lt;P&gt;Hi, I got an empty returned when I use 'child_get' after invoke 'aggr-options-list-info' API in Perl.&lt;/P&gt;&lt;P&gt;'aggr-options-list-info' invoke result is 'pass'. But it returns 'undefined' when i use 'child_get' to get the options.&lt;/P&gt;&lt;P&gt;I debug this for many times but it didn't work for me. aggr-space-list-info also doesn't work for me due to the same reason.&lt;/P&gt;&lt;P&gt;Any one can help me? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Linux version: Redhat5.4 32bit&lt;/P&gt;&lt;P&gt;Perl version: 5.8.8&lt;/P&gt;&lt;P&gt;Simulator: 7.3.6-sim-cdrom-image-v22.iso&lt;/P&gt;&lt;P&gt;SDK: 5.4P1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, as a new Perl user, I'm always confused between 'child_get" and "children_get".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@szds script]# ./nasmanager Can't call method "children_get" on an undefined value at ./nasmanager line 45.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;sub get_aggr_option()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connect_filer();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $out=$s-&amp;gt;invoke("aggr-options-list-info","aggregate","aggr1");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($out-&amp;gt;results_status() eq "failed")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; print($out-&amp;gt;results_reason() ."\n");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; exit (-2);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; my $optinfo = $out-&amp;gt;child_get("aggr-option-info");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ### this line below has error because $optinfo is undefined&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; my @result=$optinfo-&amp;gt;children_get();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach $opt (@result)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; my $realloc=$opt-&amp;gt;child_get_string("free-space-realloc");&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; print $realloc;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 20:01:53 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121145#M2002</guid>
      <dc:creator>wolfohyeah</dc:creator>
      <dc:date>2025-06-04T20:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: got empty returned when invoke 'aggr-option-list-info' and other aggr API in Perl</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121151#M2004</link>
      <description>&lt;P&gt;well, I try another filer and it returned 'fail' when invoke it. XML return 13001 result with title '404 not found'. But it works in ZEDI.&lt;/P&gt;&lt;P&gt;I don't know why it works in Zedi but doesn't work in Perl script. I copied the script from Zedi.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 07:47:23 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121151#M2004</guid>
      <dc:creator>wolfohyeah</dc:creator>
      <dc:date>2016-07-11T07:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: got empty returned when invoke 'aggr-option-list-info' and other aggr API in Perl</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121155#M2005</link>
      <description>&lt;P&gt;The output of the&amp;nbsp;aggr-options-list-info API is called "options". &amp;nbsp;That is what you need to fetch via child_get. &amp;nbsp;"options" is an array of&amp;nbsp;aggr-option-info data types which you can then fetch&amp;nbsp;with children_get.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;my $optinfo = $out-&amp;gt;child_get("options");
my @result = $optinfo-&amp;gt;children_get();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 08:34:51 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121155#M2005</guid>
      <dc:creator>wh_slayer</dc:creator>
      <dc:date>2016-07-11T08:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: got empty returned when invoke 'aggr-option-list-info' and other aggr API in Perl</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121157#M2007</link>
      <description>&lt;P&gt;Hi wh_slayer,&lt;/P&gt;&lt;P&gt;Thank you for your reply. I try '$optinfo=$out-&amp;gt;child_get("options")' and the script can run correctly.&lt;/P&gt;&lt;P&gt;But I still confused about how to get the value of the specific options (eg. fs_size_fixed).&lt;/P&gt;&lt;P&gt;Before this week, I just invoke the qtree/volume/quota API for sime simple management. Now I need to try the options API but the document doesn't cleary describe it .&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 09:00:35 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121157#M2007</guid>
      <dc:creator>wolfohyeah</dc:creator>
      <dc:date>2016-07-11T09:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: got empty returned when invoke 'aggr-option-list-info' and other aggr API in Perl</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121358#M2014</link>
      <description>&lt;P&gt;Well I generally work with the Perl bindings interface rather than the XML interface, but I think you'd do something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;my $optinfo = $out-&amp;gt;child_get("options");
my $fs_size_fixed = $optinfo-&amp;gt;child_get("fs_size_fixed");&lt;/PRE&gt;&lt;P&gt;If you haven't already discovered this, the NaElement::sprintf function is incredibly helpful for determining the structure of the data returned, especially given the amount of nesting some elements have.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jul 2016 04:23:22 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121358#M2014</guid>
      <dc:creator>wh_slayer</dc:creator>
      <dc:date>2016-07-17T04:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: got empty returned when invoke 'aggr-option-list-info' and other aggr API in Perl</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121374#M2015</link>
      <description>&lt;P&gt;Hi wh_slayer,&lt;/P&gt;&lt;P&gt;&amp;nbsp; In fact, i tried 'sprintf' and can get the name-value information in XML style.&amp;nbsp; But my purpose is to get specific name-value pairs instead of returning all. I tried "child_get" and "child_get_string" and "children_get" but empty was returned. This child_get* works in non-option API but failed in option API.&amp;nbsp; I think this is related to Perl program instead of netapp api but i have no idea.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sprintf returns like below:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;options&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;aggr-option-info&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;fs_size_fixed&amp;lt;/name&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value&amp;gt;off&amp;lt;/value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/aggr-option-info&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;aggr-optioninfo&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;...&amp;lt;/name&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value&amp;gt;...&amp;lt;/value&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/aggr-option-info&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/options&amp;gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2016 03:07:47 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121374#M2015</guid>
      <dc:creator>wolfohyeah</dc:creator>
      <dc:date>2016-07-18T03:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: got empty returned when invoke 'aggr-option-list-info' and other aggr API in Perl</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121697#M2030</link>
      <description>well, it still doesn't work except sprintf.</description>
      <pubDate>Mon, 25 Jul 2016 05:53:18 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121697#M2030</guid>
      <dc:creator>wolfohyeah</dc:creator>
      <dc:date>2016-07-25T05:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: got empty returned when invoke 'aggr-option-list-info' and other aggr API in Perl</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121712#M2032</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/40585"&gt;@wolfohyeah﻿&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a Perl snippet which will return the value of a specific aggregate option without using the Perl bindings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#! /usr/bin/perl

use NaServer;
use NaElement;

my $server = "controller.name.or.ip";
my $username = "admin";
my $password = "SuperSecret!";
my $aggregate_name = "aggr1";


my $s = NaServer-&amp;gt;new ($server, 1, 3);
$s-&amp;gt;set_style(LOGIN);
$s-&amp;gt;set_admin_user($username, $password);
$s-&amp;gt;set_transport_type(HTTP);
$s-&amp;gt;set_hostname_verification( 0 );

my $aggr_options_request = $s-&amp;gt;invoke(
    "aggr-options-list-info", 
    "aggregate", 
    $aggregate_name
);

foreach my $option ($aggr_options_request-&amp;gt;child_get('options')-&amp;gt;children_get()) {
    if ($option-&amp;gt;child_get_string("name") eq "fs_size_fixed") {
        print "fs_size_fixed = " . $option-&amp;gt;child_get_string("value") . "\n";
    }
    
    # show all options and their values
    #print " Option Name: " . $option-&amp;gt;child_get_string("name") . "\n";
    #print "Option Value: " . $option-&amp;gt;child_get_string("value") . "\n\n";
  
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the same thing using Perl bindings:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;my $aggr_options_request = $s-&amp;gt;aggr_options_list_info( 'aggregate' =&amp;gt; $aggregate_name );

foreach (@{$aggr_options_request-&amp;gt;{'options'}-&amp;gt;{'aggr-option-info'}}) {
    if ($_-&amp;gt;{'name'} eq "fs_size_fixed") {
        print "fs_size_fixed = " . $_-&amp;gt;{'value'} . "\n";
    }
    
    # show all options and their values
    #print " Option Name: " . $_-&amp;gt;{'name'} . "\n";
    #print "Option Value: " . $_-&amp;gt;{'value'} . "\n\n";
  
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 15:47:38 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121712#M2032</guid>
      <dc:creator>asulliva</dc:creator>
      <dc:date>2016-07-25T15:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: got empty returned when invoke 'aggr-option-list-info' and other aggr API in Perl</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121720#M2033</link>
      <description>&lt;P&gt;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/8479"&gt;@asulliva﻿&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Asulliva,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your suggestion. It&amp;nbsp; perfectly solved my problem. I can get the specific value now. Thank you again.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 01:40:41 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/got-empty-returned-when-invoke-aggr-option-list-info-and-other-aggr-API-in-Perl/m-p/121720#M2033</guid>
      <dc:creator>wolfohyeah</dc:creator>
      <dc:date>2016-07-26T01:40:41Z</dc:date>
    </item>
  </channel>
</rss>

