I have begun using the NetApp API and am wondering if I am missing documentation or using a lesser preferred programming language. I initially wanted to use c# to call the API and got a test program working, but it seems that NetApp wants things to go through PowerShell. The only sample source code is for PowerShell Cmdlets. There is none in the current documentation for using c# directly.
I got the Cmdlet Get_VolumeListInfo from the sample in netapp-manageability-sdk-5.1-dotnet-bindings working. The documentation in netapp-manageability-sdk-ontap-api-documentation/ontapi_1.20/7-Mode references volume-list-info and the sample uses VolumeListInfo volinput = new VolumeListInfo();. Is there better documentation for Cmdlets and c#?
In adding to the Cmdlet I can’t seem to get snapshot-list-info working.
SnapshotListInfo snapinput = new SnapshotListInfo();
SnapshotListInfoResult snapoutput = snapinput.Invoke(Server);
SnapshotInfo[] snapshots = snapoutput.Snapshots;
The Cmdlet throws an error saying that “Either argument volume or (target-name, target-type) pair should be specified” The documentation refers to using the volume as input, but I am not sure where to supply the volume name. There are no samples. Perhaps there is a slight learning curve, so my real question is if many others are using Cmdlets in c# to access the NetApp API? I get very few results searching for things like SnapshotListInfoResult and NetApp c# api. Is there a preferred language that most people are using? I want the ability to do more things than I believe calling PowerShell directly can do.
Thanks,
Scott