Software Development Kit (SDK) and API Discussions

snapmirror-break API problems

SSMAYNARD
3,137 Views

Hello everyone,

 

I am trying to create a script using the snapmirror-break API and I am having no luck getting it to work.  I've done a lot of searching and testing and I can't seem to get the API to function.  I was looking for some examples (couldn't find any) and I've tried several different variations on the command to get this to work.  I will also need to do a snapmirror-resync after the snapmirror-break so any thoughts or experiences with that API would also be appreciated.  According to the documentation the only input required is the destination location using the format below but it hasn't worked so far for me.  I've done this process on the Ontap command line many many times.  I just can't seem to get the API to work.   I am using SDK 5 and Ontap 8.1.1

 

          Specifies the destination endpoint of the SnapMirror relationship in the following format depending on Data ONTAP: 7-Mode:<filer>:/vol/<volume>[/<qtree>]

 

 

 

My Output:   (I've tried different ways of specifying the destination ie. <vol-name>, <filer>:<vol-name>, <filer>:/vol/<vol-name>, etc. with the same result)

 

perl apitest.pl <filer> <username> '<password>' snapmirror-break <dest-filer>:<dest-vol>                                             

 

OUTPUT:

<results status="failed" reason="in Zapi::invoke, invalid number of parameters" errno="13001"></results>

1 ACCEPTED SOLUTION

rle
NetApp Alumni
3,137 Views

Hi Stuart -

If apitest.pl is like apitest then in the example above, you need to do this:

perl apitest.pl <filer> <username> '<password>' snapmirror-break destination-location <dest-filer>:<dest-vol>

Regards,

   - Rick -

View solution in original post

2 REPLIES 2

rle
NetApp Alumni
3,138 Views

Hi Stuart -

If apitest.pl is like apitest then in the example above, you need to do this:

perl apitest.pl <filer> <username> '<password>' snapmirror-break destination-location <dest-filer>:<dest-vol>

Regards,

   - Rick -

SSMAYNARD
3,137 Views

Hey Rick,

So, I just smacked myself on the forehead once I read your post and got the command working.  It was a simple misinterpretation of the documentation.  Thanks very much for helping me out again working with the API.  Getting this script running will help us a great deal with our backup solution.  You the man Rick.

Regards,

Stuart

Public