Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I'm trying to rewrite some of my Perl scripts for OCUM 7 and Cdot. With 7-mode I use the OCUM as single point of access with api-proxy, which works nicely. But I don't get it running with cdot. OCUM is 7.1P2, the cluster is a simulator with NetApp Release 9.1: Thu Dec 22 23:05:58 UTC 2016 and I'm using netapp-manageability-sdk-5.7. Below you see a code snippet I use to test it.
sub get_cluster { my $Server=shift; my $Cluster=shift; my %Out; my $api = new NaElement('api-proxy'); my $request = new NaElement('request'); my $args = new NaElement('args'); $request->child_add_string('name','cluster-node-get-iter'); $request->child_add($args); $api->child_add($request); $api->child_add_string('target',$Cluster); $api->child_add_string('timeout','60'); print $api-> sprintf(); my $ALI = $Server->invoke_elem($api); if ($ALI->results_status() eq 'failed') { print STDERR 'Error:\n'; print STDERR $ALI->sprintf(); } else { my $Response=$ALI->child_get("response"); my $Status=$Response->child_get_string("status"); if($Status eq "passed") { my $Results=$Response->child_get("results"); my $SRD=$Results->child_get("attributes-list"); my @SnapList=$SRD->children_get(); foreach my $Snapshot (@SnapList) { my $Node=$Snapshot->child_get_string("node-name"); print "$Cluster -> $Node\n"; } } } return %Out; }# END get_cluster
At the moment, I only get this output:
<api-proxy> <request> <name>cluster-node-get-iter</name> <args></args> </request> <target>clustername</target> <timeout>60</timeout> </api-proxy> Error:\n<results status="failed" reason="Invalid resource key clustername." errno="24027"></results>
Is there anything different in cdot? Unfortunately I haven't found an example with Perl yet.
0 REPLIES 0
