Software Development Kit (SDK) and API Discussions

OnCommand Unified manager unsubscribe API example

MartijnMoretDMP

Hi,

I am running OnCommand Unified manager 6.1R1.

A storage service has a reference to a volume which has been removed.

The storage service was created with CommVault version 10.

 

It did/does not do a storage service unsubscribe for that volume.

I read in the API that I need to do a unsubscribe.

My question is: Does anyone have an example to do this?

 

Sources I have used: https://library.netapp.com/ecm/ecm_download_file/ECMP1416663

 

 

Thanks!

 

Regards,

Martijn

1 ACCEPTED SOLUTION

francoisbnc

Hi,

Best is to use zexplore Developpement Interface Utility to have more details.

 

This is an example in Python for retrieve subscriptions items and from  there, you can unubcribe the member you need with api  NaElement("storage-service-unsubscribe")

 

** Iterations subscriptions from storage service key

 

import sys
sys.path.append("<path_to_nmsdk_root>/lib/python/NetApp")
from NaServer import *


s = NaServer("ocum", 1 , 0)
s.set_server_type("DFM")
s.set_transport_type("HTTPS")
s.set_port(443)
s.set_style("LOGIN")
s.set_admin_user("admin", "<password>")


api = NaElement("storage-service-subscription-iter")
api.child_add_string("storage-service-resource-key","0ce429fe-4d45-4b3d-b9d7-4f9c27d1cc55:app_type=OCUM,type=storage_service,uuid=6adf153f-3702-4d8f-9df2-ade6f12bf4dc")

xo = s.invoke_elem(api)
if (xo.results_status() == "failed") :
   print ("Error:\n")
   print (xo.sprintf())
   sys.exit (1)

 

print ("Received:\n")
print (xo.sprintf())

 

 

 

View solution in original post

2 REPLIES 2

francoisbnc

Hi,

Best is to use zexplore Developpement Interface Utility to have more details.

 

This is an example in Python for retrieve subscriptions items and from  there, you can unubcribe the member you need with api  NaElement("storage-service-unsubscribe")

 

** Iterations subscriptions from storage service key

 

import sys
sys.path.append("<path_to_nmsdk_root>/lib/python/NetApp")
from NaServer import *


s = NaServer("ocum", 1 , 0)
s.set_server_type("DFM")
s.set_transport_type("HTTPS")
s.set_port(443)
s.set_style("LOGIN")
s.set_admin_user("admin", "<password>")


api = NaElement("storage-service-subscription-iter")
api.child_add_string("storage-service-resource-key","0ce429fe-4d45-4b3d-b9d7-4f9c27d1cc55:app_type=OCUM,type=storage_service,uuid=6adf153f-3702-4d8f-9df2-ade6f12bf4dc")

xo = s.invoke_elem(api)
if (xo.results_status() == "failed") :
   print ("Error:\n")
   print (xo.sprintf())
   sys.exit (1)

 

print ("Received:\n")
print (xo.sprintf())

 

 

 

View solution in original post

Thanks!

I was able to unsubcribe my volumes using the ZExplore interface.

As it was only one volume, I used the XML interface.

 

I used three standaard api calls:

storage-service-iter

storage-service-subscription-iter

storage-service-unsubscribe

 

Regards,

Martijn

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public