There are a number of gaps in the SDK coverage. This has been the case for years and contunies to be frustrating. I've never managed to get a comittment from NetApp to fix the gaps.
To avoid falling back to an alternate conneciton method you can send CLI commands over the existing HTTP(S) connection using a NaElelemt type 'system-cli'. I have no idea if this is supported or not, but I use it extensively to plug gaps in the SDK.
this is an exmple method from my OO API. I don't know your coding style (and this page will kill my indentation, so ignore that) but you should get the idea.
sub get_snapshot_used {
# Workaround API gap
my $self = shift;
$self->verbose;
$self->debug( { Passed => \@_ } );
my $serv = $self->get_classic->get_naserver;
($serv)
|| croak ( "No naserver object bound" );
my $name = $self->get_name();
my $cmd = NetAppApi::NaElement->new("system-cli");
my $cmd_args = NetAppApi::NaElement->new("args");
$cmd_args->child_add(NetAppApi::NaElement->new ("arg", "df"));
$cmd_args->child_add(NetAppApi::NaElement->new ("arg", "$name"));
$cmd->child_add($cmd_args);
my $output = $serv->invoke_elem( $cmd );
$self->debug( { Response => $output } );
if ( $output->results_status() eq "failed" ) {
croak (
"Unable to run system-cli $cmd,\n",
$output->results_reason() . "\n"
);
}
my @lines = split /\n/,$output->child_get_string("cli-output");;
my $used;
LINE:
for my $line (@lines){
#/vol/<name>/.snapshot 7680 27940 0 364% /vol/<volumename>/.snapshot
if ($line =~ m/$name\/.snapshot/){
my @parts = split /\s+/,$line;
$used = $parts[2];
last LINE;
}
}
return $used;
}