Active IQ Unified Manager Discussions

Perl, api-proxy and cdot


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');


	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:



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.