cluster mode system-cli with SDK

[ Edited ]



i'm trying to get system-cli from SDK to work in clsuter mode environment, but it doesnt seem to work for me (Perl code):

my $server = $_[0];
my $cmd = NaElement->new("system-cli");
my $cmd_args = NaElement->new("args");
$cmd_args->child_add(NaElement->new("arg", "df"));
my $out = $server->invoke_elem( $cmd );
if($out->results_status() eq "failed")
print($out->results_reason() ."\n");
my $results = $out->child_get_string("cli-output");;
print Dumper(\$results);

However nothing is returned..


can anyone please advise? 




Re: cluster mode system-cli with SDK

Yeah.. its almost a month.. 

If you feel its fun to use perl.. im sure you will be able to figure out what you want from this....

I guess.. no one really use perl anymore.. 


A good debugging technique would be to use: print $cmd->sprintf(); to verify the element structure.


use strict;
use warnings;
use lib "/netapp-manageability-sdk-5.6/lib/perl/NetApp";
use NaServer;
use NaElement;

my $s = new NaServer('', 1 , 31);
    $s->set_admin_user('username', 'password');

my $api = new NaElement('system-cli');
    my $xi = new NaElement('args');

print $api->sprintf();

my $xo = $s->invoke_elem($api);
if ($xo->results_status() eq 'failed') {
    print 'Error:\n';
    print $xo->sprintf();
    exit 1;

print 'Received:\n';
print $xo->sprintf();

Hope this helps...