2016-07-26 04:21 AM
GetOptions('Cluster=s' => \$Cluster,
'VserverName=s' => \$VserverName,
my $wfautil = WFAUtil->new();
my %inputhash = ('owning-vserver-name' => $VserverName);
my %volidattribhash=('volume-id-attributes' => \%inputhash);
my %volattrib=('volume-attributes' => \%volidattribhash);
my %query =('query' => \%volattrib);
Is the code fine or there is anything i need to change ?
Also I am gettting error as : 18:00:21.894 ERROR [Delete Volumes based on Vserver name] Failed executing command. Exception: No definition for typedef is-cft-precommit found at C:\Program Files\NetApp\WFA\perl\nmsdk/OntapClusterAPI.pm line 78812, <STDIN> line 1.
Any inputs on this would be appreciable
Solved! SEE THE SOLUTION
2016-07-26 04:25 AM
Make sure you use compatible version of NMSDK bindings with that particular version of ONTAP.
The typedef error normally comes because of that if the version of ONTAP to which you are trying
to connect is of a higher version than the NMSDK version which you are using.
2016-07-26 04:51 AM
Actually the thing is customer is having 3.1 version in their environment. And they want to delete multiple volumes based on vserver name. Suppose if there is a vserver vs1 and it contains 6 volumes . While deleting vserver, volumes also should get deleted. So to get volumes , I am using vol-get-iter api. If I upgrade my version to 4.0 .. Then that workflow will not work in customers 3.1 WFA version.
Is there any alternative ?
2016-07-26 02:44 PM
Yes I am aware of it. But here user is not going to enter the volumenames in inputs. User will write vserver name and whatever the volumes of vserver should be deleted before deleting vserver. So to catch the volumes owning by the vserver I found vol-get-iter api.
2016-07-26 02:47 PM
But here one thing I can do is to run the sql query in the code itself and collect all volume names owning by vserver and it should delete all those volumes. I think we have a function in wfa to execute sql query if I am not wrong.