<?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 WFA workflow - Perl Binding API - snapmirror_destroy in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/WFA-workflow-Perl-Binding-API-snapmirror-destroy/m-p/120147#M1969</link>
    <description>&lt;P&gt;I am writing a WFA workflow which deletes a snapmirror relationship. The code works fine if a snapmirror relatioship exists. But, 'snapmirror_destroy' throws an error if &amp;nbsp;a snapmirror relationship does not exist. I would like to ignore this error. &amp;nbsp;I tried 'eval', 'if' &amp;amp; 'try'. But havent figured out how to make the workflow finish succeffuly. Any ideas how I can accomplish this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;ERROR:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;14:42:23.654 ERROR &amp;nbsp;[cDOT_snapmirror_delete_v1.0 ] Failed executing command. Exception: Relationship with destination vserver01:sm_vol_7mode_cdot_snapmirror not found. (entry doesn't exist) (15661)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;use strict;
use WFAUtil;
use Getopt::Long;

 
my $DestinationVserver; 
my $DestinationVolume; 
my $ClusterFQDN;  
my $sminfo = {};


GetOptions (
            "DestinationVserver=s" =&amp;gt; \$DestinationVserver,
            "DestinationVolume=s" =&amp;gt; \$DestinationVolume,
            "ClusterFQDN=s" =&amp;gt; \$ClusterFQDN,
           ) or die "Illegal Command Parameters \n"; 


my $wfaUtil = WFAUtil-&amp;gt;new();

my $server = $wfaUtil-&amp;gt;connect($ClusterFQDN);

$wfaUtil-&amp;gt;sendLog( 'INFO','Deleteing snapmirror relationship...');

my %init_input = ('destination-location' =&amp;gt; "$DestinationVserver:$DestinationVolume");

try {
  $server-&amp;gt;snapmirror_destroy(%init_input)
} catch {
  $wfaUtil-&amp;gt;sendLog( 'INFO','A snapmirror relationship was not found'); 
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 20:27:49 GMT</pubDate>
    <dc:creator>David_01844</dc:creator>
    <dc:date>2025-06-04T20:27:49Z</dc:date>
    <item>
      <title>WFA workflow - Perl Binding API - snapmirror_destroy</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/WFA-workflow-Perl-Binding-API-snapmirror-destroy/m-p/120147#M1969</link>
      <description>&lt;P&gt;I am writing a WFA workflow which deletes a snapmirror relationship. The code works fine if a snapmirror relatioship exists. But, 'snapmirror_destroy' throws an error if &amp;nbsp;a snapmirror relationship does not exist. I would like to ignore this error. &amp;nbsp;I tried 'eval', 'if' &amp;amp; 'try'. But havent figured out how to make the workflow finish succeffuly. Any ideas how I can accomplish this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;ERROR:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;14:42:23.654 ERROR &amp;nbsp;[cDOT_snapmirror_delete_v1.0 ] Failed executing command. Exception: Relationship with destination vserver01:sm_vol_7mode_cdot_snapmirror not found. (entry doesn't exist) (15661)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;use strict;
use WFAUtil;
use Getopt::Long;

 
my $DestinationVserver; 
my $DestinationVolume; 
my $ClusterFQDN;  
my $sminfo = {};


GetOptions (
            "DestinationVserver=s" =&amp;gt; \$DestinationVserver,
            "DestinationVolume=s" =&amp;gt; \$DestinationVolume,
            "ClusterFQDN=s" =&amp;gt; \$ClusterFQDN,
           ) or die "Illegal Command Parameters \n"; 


my $wfaUtil = WFAUtil-&amp;gt;new();

my $server = $wfaUtil-&amp;gt;connect($ClusterFQDN);

$wfaUtil-&amp;gt;sendLog( 'INFO','Deleteing snapmirror relationship...');

my %init_input = ('destination-location' =&amp;gt; "$DestinationVserver:$DestinationVolume");

try {
  $server-&amp;gt;snapmirror_destroy(%init_input)
} catch {
  $wfaUtil-&amp;gt;sendLog( 'INFO','A snapmirror relationship was not found'); 
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 20:27:49 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/WFA-workflow-Perl-Binding-API-snapmirror-destroy/m-p/120147#M1969</guid>
      <dc:creator>David_01844</dc:creator>
      <dc:date>2025-06-04T20:27:49Z</dc:date>
    </item>
  </channel>
</rss>

