Using netapp-manageability-sdk-5.7 with Perl to access a simulated cdot cluster with 9.1, I get undefined values with child_get_string in net_ipspace-get-iter.
It occurs not everywhere, only in <ports>, <vservers> or <broadcast-domains> and I'm using the same construct to get the values I use in igroup-get-iter to get <initiator-name>, which is similar and works fine there.
Code snippet:
my $List=$xo->child_get("attributes-list");
my @Attributes=$List->children_get();
my $Count=0;
foreach my $Attr (@Attributes) {
print "\n".$Attr->sprintf();
my $UUID=$Attr->child_get_string("uuid"); # works as expected
my $Vservers=$Attr->child_get("vservers");
my @VserverList=$Vservers->children_get();
foreach my $Vserver (@VserverList) {
print "\n".$Vserver->sprintf(); # shows the value I want
my $VserverName=$Vserver->child_get_string("vserver-name"); # returns undef
print "$VserverName\n";
}
output:
<net-ipspaces-info>
<broadcast-domains>
<broadcast-domain-name>prod_smc</broadcast-domain-name>
</broadcast-domains>
<id>23</id>
<ipspace>ips_smc</ipspace>
<ports>
<net-qualified-port-name>smc-na010-01:a0a</net-qualified-port-name>
</ports>
<uuid>3c213daa-4b97-11e7-bef5-005056be73f9</uuid>
<vservers>
<vserver-name>ips_smc</vserver-name>
</vservers>
</net-ipspaces-info>
<vserver-name>ips_smc</vserver-name>
Use of uninitialized value $VserverName in concatenation (.) or string at ./na_cdot.pl line 1311.
It's not a show stopper, since I'm able to get the data I want with a workaround. But I'm really curious if this is an error in the API or if I have overlooked something.