Hi, I got an empty returned when I use 'child_get' after invoke 'aggr-options-list-info' API in Perl.
'aggr-options-list-info' invoke result is 'pass'. But it returns 'undefined' when i use 'child_get' to get the options.
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.
Any one can help me? Thanks.
Linux version: Redhat5.4 32bit
Perl version: 5.8.8
Simulator: 7.3.6-sim-cdrom-image-v22.iso
SDK: 5.4P1
By the way, as a new Perl user, I'm always confused between 'child_get" and "children_get".
[root@szds script]# ./nasmanager Can't call method "children_get" on an undefined value at ./nasmanager line 45.
My code:
sub get_aggr_option()
{
connect_filer();
$out=$s->invoke("aggr-options-list-info","aggregate","aggr1");
if ($out->results_status() eq "failed")
{
print($out->results_reason() ."\n");
exit (-2);
}
my $optinfo = $out->child_get("aggr-option-info");
### this line below has error because $optinfo is undefined
my @result=$optinfo->children_get();
foreach $opt (@result)
{
my $realloc=$opt->child_get_string("free-space-realloc");
print $realloc;
}
}