I have a bunch of NetApp filers, which I've been accessing via ssh
with public-private key pairs.
I would like to extend what I'm doing - we're repeatedly hitting limitations where e.g. ssh
is failing to complete commands (disconnnect before execute) and formatting of output from the commands we're running is 'human readable' which means it's annoying to machine parse.
So I'd like to query the API and for various reasons I'd like to do so using 'off the shelf' modules from CPAN, rather than the NetApp SDK.
Can this be done, and if so how?
(I had pondered whether this was a better fit for Stack Overflow, but concluded that it was probably more relevant to sysadmin than perl scripting).
The basics are pretty simple - there's two things you need to copy with:
From CPAN, there are various modules that can do this. I like
LWP
andXML::Twig
.DFM
orfiler
and various api requests are available. (You may need to download the SDK from: http://mysupport.netapp.com/NOW/download/software/nmsdk/5.3/)It goes a bit like this: