It should be something like this:
$out = $s->invoke("net-ifconfig-get");
if ($out->results_status() eq "failed) {
print($out->results_reason() ."\n");
exit(-2)
}
my $interface_info = $out->child_get("interface-config-info");
my @info = $interface_info->children_get();
my $interface;
foreach $interface (@info) {
my $name = $interface->child_get_string('interface-name');
print "interface-name: $name \n";
my $size_total = $interface->child_get_string('mediatype');
print "mediatype: $size_total \n";
my $size_used = $interface->child_get_int('mtusize');
print "mtusize: $size_used \n";
print "--------------------------------------\n";
my $ipv4_addresses = $interface->child_get("v4-primary-address");
if ($ipv4_addresses) {
my $ipaddr_info = $ipv4_addresses->child_get("ip-address-info");
print("IP Address: " . $ipaddr_info->child_get_string("address") . "\n");
}
}
I don't have a 7-mode machine to test, so you'll have try the code. BTW, you can use ZEDI to explore APIs. Check-out http://developer.netapp.com for the download.
Regards,
- Rick -