This morning I decided to play with the passthru authentication via RPC that the SDK provides, and boy is it easy! To utilize passthru authentication you first you need to install a dll. Assuming the sdk is saved to C:
x86
copy “C:manage-ontap-sdk-3.5libntntapadmin.dll” %windir%System32ntapadmin.dll
x64
copy “C:manage-ontap-sdk-3.5libntx64ntapadmin.dll” %windir%System32ntapadmin.dll
copy “C:manage-ontap-sdk-3.5libntntapadmin.dll” %windir%SysWOW64ntapadmin.dll
ia64
copy “C:manage-ontap-sdk-3.5libntia64ntapadmin.dll” %windir%System32ntapadmin.dll
copy “C:manage-ontap-sdk-3.5libntntapadmin.dll” %windir%SysWOW64ntapadmin.dll
Now that the appropriate DLL is installed connecting to a Filer is as simple as specifiying the style as RPC.
1 2 3 4 5 6 7 8 9 10 11 |
#Load the SDK [void][Reflection.Assembly]::LoadFile('C:manage-ontap-sdk-3.5libDotNetManageOntap.dll') # Instantiate a new NaServer object specifying our destination filer as 'NetApp', and using OnTAPI 1.0 $NaServer = New-Object Netapp.Manage.NaServer("NetApp",1,0) #Set the connection style to RPC $NaServer.Style = "RPC" #Create our request in this case 'system-get-version' $NAElement = New-Object NetApp.Manage.NaElement("system-get-version") #Get the results $NaServer.InvokeElem($NAElement).GetChildContent("version") NetApp Release 7.2.5.1: Wed Jun 25 09:03:07 PDT 2008 |
Similar procedures will enable the SLL/encryption capabilities within the SDK only using the ssleay32.dll(SSL)/libeay32.dll(encryption). I’m not yet sure what the zephyr(ZAPI) assemblies do, but hey I’m just admin living in a devs world.
Enjoy
~Glenn