<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Perl, api-proxy and cdot in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Perl-api-proxy-and-cdot/m-p/136318#M24733</link>
    <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;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-&amp;gt;child_add_string('name','cluster-node-get-iter');
	$request-&amp;gt;child_add($args);
	$api-&amp;gt;child_add($request);
	
	$api-&amp;gt;child_add_string('target',$Cluster);
	$api-&amp;gt;child_add_string('timeout','60');

	print $api-&amp;gt; sprintf();
	
	my $ALI = $Server-&amp;gt;invoke_elem($api);
	if ($ALI-&amp;gt;results_status() eq 'failed') {
		print STDERR 'Error:\n';
		print STDERR $ALI-&amp;gt;sprintf();
	}
	else {
		my $Response=$ALI-&amp;gt;child_get("response");
		my $Status=$Response-&amp;gt;child_get_string("status");
		if($Status eq "passed") {
			my $Results=$Response-&amp;gt;child_get("results");	
			my $SRD=$Results-&amp;gt;child_get("attributes-list");
			my @SnapList=$SRD-&amp;gt;children_get();
			foreach my $Snapshot (@SnapList) {
				my $Node=$Snapshot-&amp;gt;child_get_string("node-name");
				print "$Cluster -&amp;gt; $Node\n";
			}	
		}
	}
	return %Out;
}# END get_cluster&lt;/PRE&gt;&lt;P&gt;At the moment, I only get this output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;api-proxy&amp;gt;
        &amp;lt;request&amp;gt;
                &amp;lt;name&amp;gt;cluster-node-get-iter&amp;lt;/name&amp;gt;
                &amp;lt;args&amp;gt;&amp;lt;/args&amp;gt;
        &amp;lt;/request&amp;gt;
        &amp;lt;target&amp;gt;clustername&amp;lt;/target&amp;gt;
        &amp;lt;timeout&amp;gt;60&amp;lt;/timeout&amp;gt;
&amp;lt;/api-proxy&amp;gt;

Error:\n&amp;lt;results status="failed" reason="Invalid resource key clustername." errno="24027"&amp;gt;&amp;lt;/results&amp;gt;&lt;/PRE&gt;&lt;P&gt;Is there anything different in cdot? Unfortunately I haven't found an example with Perl yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 14:18:35 GMT</pubDate>
    <dc:creator>arminwiesel_fts</dc:creator>
    <dc:date>2025-06-04T14:18:35Z</dc:date>
    <item>
      <title>Perl, api-proxy and cdot</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Perl-api-proxy-and-cdot/m-p/136318#M24733</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;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-&amp;gt;child_add_string('name','cluster-node-get-iter');
	$request-&amp;gt;child_add($args);
	$api-&amp;gt;child_add($request);
	
	$api-&amp;gt;child_add_string('target',$Cluster);
	$api-&amp;gt;child_add_string('timeout','60');

	print $api-&amp;gt; sprintf();
	
	my $ALI = $Server-&amp;gt;invoke_elem($api);
	if ($ALI-&amp;gt;results_status() eq 'failed') {
		print STDERR 'Error:\n';
		print STDERR $ALI-&amp;gt;sprintf();
	}
	else {
		my $Response=$ALI-&amp;gt;child_get("response");
		my $Status=$Response-&amp;gt;child_get_string("status");
		if($Status eq "passed") {
			my $Results=$Response-&amp;gt;child_get("results");	
			my $SRD=$Results-&amp;gt;child_get("attributes-list");
			my @SnapList=$SRD-&amp;gt;children_get();
			foreach my $Snapshot (@SnapList) {
				my $Node=$Snapshot-&amp;gt;child_get_string("node-name");
				print "$Cluster -&amp;gt; $Node\n";
			}	
		}
	}
	return %Out;
}# END get_cluster&lt;/PRE&gt;&lt;P&gt;At the moment, I only get this output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;api-proxy&amp;gt;
        &amp;lt;request&amp;gt;
                &amp;lt;name&amp;gt;cluster-node-get-iter&amp;lt;/name&amp;gt;
                &amp;lt;args&amp;gt;&amp;lt;/args&amp;gt;
        &amp;lt;/request&amp;gt;
        &amp;lt;target&amp;gt;clustername&amp;lt;/target&amp;gt;
        &amp;lt;timeout&amp;gt;60&amp;lt;/timeout&amp;gt;
&amp;lt;/api-proxy&amp;gt;

Error:\n&amp;lt;results status="failed" reason="Invalid resource key clustername." errno="24027"&amp;gt;&amp;lt;/results&amp;gt;&lt;/PRE&gt;&lt;P&gt;Is there anything different in cdot? Unfortunately I haven't found an example with Perl yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 14:18:35 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Perl-api-proxy-and-cdot/m-p/136318#M24733</guid>
      <dc:creator>arminwiesel_fts</dc:creator>
      <dc:date>2025-06-04T14:18:35Z</dc:date>
    </item>
  </channel>
</rss>

