Administer Your NetApp Filers With Python

I love Python. I find it really easy to use to write programs with.

I’m also pretty into NetApp Filers lately. I spend a bunch of time helping enterprise customers with using them well.

So, of course, I want to be able to administer them using Python.

Second Class Citizens

Alas, the NetApp administration SDK has bindings for Perl and Java, but not Python. What is an enterprising young geek to do? Why, write their own, of course!

So I did. Some years ago. It’s been hiding inside my ModiPy change control automation software for a couple of years where no one could find it. Kinda dumb, no?

Well, tonight I’ve freed it from the confines of that other software, and it’s now available from the Python Cheeseshop for your easy download.

You can grab it directly from your commandline like this:

easy_install NetAppZAPI

Frighteningly easy, no?

Using It

NetAppZAPI is licensed under the MIT license, so you can grab it and use it in your own programs pretty much however you like.

I’ve included some example scripts to rename directories, trigger SnapVaults, and delete whole trees because there’s no qtree delete command. Well, it mostly deletes whole trees, unless you have symlinks. It’s a Filer thing, not my code.

Be really careful with that dangerous rm-rf command. Otherwise, have fun administering your Filers from Python!

Help

I haven’t written up much in the way of helpful documentation, sorry. Given the audience, if you’re interested in using this tool you’re a hardcore hacker type anyhow, so check out the code comments.

But if you want specific help with something, cool, just email me: [email protected].

Disclaimer

I’m not a NetApp employee, but I do a bunch of work with them. This is not official NetApp software. Using it may set fire to your datacentre. It may also make you incredibly productive and sexy. Your milage may vary.

If you do somehow manage to set fire to your datacentre, crash your Filers, or delete all your porn, don’t blame me, or them. You’ve been warned.

Having said that, I’ve used it loads for several years without problems. You can always try it out on a simulator first.

Bookmark the permalink.

Comments are closed