Is there a list of Powershell/PERL methods for this anywhere?

by on ‎2013-04-10 06:21 AM

I am struggling to find one.  I understand the REST API, but built-in methods are insufficient for a task I wish to perform and I wish to see if a Powershell cmdlet or PERL method exists.

Comments
bdave Former NetApp Employee

Are you referring to building a custom WFA command using PowerShell or Perl? 

The NetApp PowerShell Toolkit is bundled with WFA.  You can find the PowerShell Toolkit documentation in the WFA install folder under \PoSH\Modules\DataONTAP\webhelp\index.html.  So, for the default install location, it would be under C:\Program Files\NetApp\WFA\PoSH\Modules\DataONTAP\webhelp\index.html 

To use Perl commands, you need to install Perl and the NMSDK perl modules on the WFA server (as documented in the install & setup guide).  Documentation around NMSDK can be found on the support site or in the download of NMSDK.  Here's a link to the docs on the support site: http://support.netapp.com/documentation/productlibrary/index.html?productID=60427

Hope this helps,

Dave

PERL.  That link only takes me to release notes.  I don't see a document for the PERL module itself.

bdave Former NetApp Employee

Oops.  You're right.  The NMSDK "documentation" page of the support site seems to only have Release Notes and Notices.  Not very useful.   

Instead, download the NMSDK from the support.netapp.com, downloads -> software... here: http://support.netapp.com/NOW/cgi-bin/software/

Find "NetApp Manageability SDK" in the list and choose "All Platforms".  Fill out the request form, etc to download the NMSDK. 

Then, unzip the downloaded file and open the SDK_help.htm file.  That has all the SDK help.

But, if you haven't used ZEDI before, you should try that.  After you unzip the SDK, there's a folder inside called zedi, and within there, a file called zexplore.exe.  Launch that.  Under "Preferences" change the language to Perl.  Select the API version you want to use.  You'll see a list of APIs on the left.  Mouseover the API for info.  Drag-n-drop the API you want to use onto the Execute tab and you'll see the XML behind the API call.  Flip to the Develop tab and you'll see the Perl code, be able to modify it, etc.

You could then copy-n-paste that code into a WFA command.  There's more that is needed for passing command parameters from the WFA workflow into the Perl command, but this is a start... 

Yay!  Getting farther, thanks!

Occasional Contributor

I really think that the hard part of WFA is the difficulty of finding good clear documentation about what calls are available.

I've been programing for a *long* time, I want to be able to grab just the documentation on what commands are available to powershell that are specific to the various NetApp storage controllers.  I used to have the HTML documentation for zapi that I could browse through, put together some code and just try things out.

Almost everyone I talk to says stuff along the line of, "Oh, just read through the examples and try them out."

No, I want to read the documentation, I want to see the commands and all of their options.  In one place. And I want it to be easy to find, directly from the WFA help.  I don't mind if I have to navigate between different versions for cdot and 7mode, I just want it to be quick and easy to find.

Sorry to rant, we've some really cool tools and I'd really like to be able to read up on the possibilities rather than rely on tribal knowledge to find what I need.

Frequent Contributor

Hey Mr. Goldman!

Being an ex-unix guy like yourself, I found this difficult when I first started playing with WFA as well. What I found to be the easiest way to get this information was to use the built in help within PowerShell. So, get the NetApp PowerShell module installed on a Windows system (or just copy it to the right spot on your WFA server) per TR-3896, then run “show-nahelp” to see the NetApp cmdlets. You can also run a command like “help get-ncvol –full” from within PowerShell to get the full help for the get-ncvol cmdlet, as an example. Running this via PowerShell is also useful because it makes it easy to do some quick tests from PowerShell in order to figure out what you are doing, before putting things together in a WFA command.

Hope that helps!

Mike

Occasional Contributor

As always you rock Mike.  Thanks!  I know what the rest of my week contains!

Frequent Contributor

If you are using WFA 2.2, then you can find the links to the documentation in Online help.

Please go to the "References to learning material" link in "Help->Online Help" section.

Copy pasting the content from the same.

Data ONTAP PowerShell toolkit

The Data ONTAP PowerShell toolkit is bundled along with WFA. You can use the PowerShell toolkit cmdlets to invoke Data ONTAP commands from a PowerShel...Data ONTAP PowerShell Toolkit Help, which you can access from the following location: WFA_install_location\WFA\PoSH\Modules\DataONTAP\webhelp\index.html.

WFA_install_location is the WFA installation directory, and C:\Program Files\NetApp is the default installation directory.

Perl

WFA supports Perl commands for workflow operations. When you install WFA, the required Perl and Perl modules are installed on the WFA server. For more...ActivePerl User Guide, which you can access from the following location: WFA_install_location\WFA\Perl64\html\index.html.

WFA_install_location is the WFA installation directory, and C:\Program Files\NetApp is the default installation directory.

NetApp Manageability SDK

The required Perl modules of the NetApp Manageability SDK are bundled along with WFA. These Perl modules are required for using the Perl commands in W...WFA_install_location\WFA\perl\NMSDK\html.

WFA_install_location is the WFA installation directory, and C:\Program Files\NetApp is the default installation directory.

Occasional Contributor

Sadly my customer isn't yet on 2.2, and so I'm left without the References to Learning materials link.

With the methods Mike described above I can get to lots of the commands, but I am notably not able to get manual page entries for Connect-WfaCluster or Connect-WFAController. Is there something I need to load to get those manual pages visible, or a link in NetApp land to read up on those and any other missing commands?

Thanks,

Senjak

Frequent Contributor

Thanks.

Couple of options are available.

1.Type this location in WFA_install_location\WFA\Perl64\html\index.html in IE/Chrome. Customer need not move to 2.2. It is there in 2.1 also.

2. Or customer can install 2.2 in a spare system to get the latest help.

Details of Connect-WfaCluster or Connect-WFAController is available in the follow file:

C:\Program Files\NetApp\WFA\PoSH\Modules\WFAWrapper

if the installation directory is C:\Program Files.

In upcoming releases consolidated help will be available.

Regards

Abhi

Warning!

This NetApp Community is public and open website that is indexed by search engines such as Google. Participation in the NetApp Community is voluntary. All content posted on the NetApp Community is publicly viewable and available. This includes the rich text editor which is not encrypted for https.

In accordance to our Code of Conduct and Community Terms of Use DO NOT post or attach the following:

  • Software files (compressed or uncompressed)
  • Files that require an End User License Agreement (EULA)
  • Confidential information
  • Personal data you do not want publicly available
  • Another’s personally identifiable information
  • Copyrighted materials without the permission of the copyright owner

Files and content that do not abide by the Community Terms of Use or Code of Conduct will be removed. Continued non-compliance may result in NetApp Community account restrictions or termination.