Wednesday, September 13, 2017

Storage Automation: A Great Adventure - Red Pill

Image result for matrix take the blue pill picture

Welcome back to our adventure down the Storage Automation (Notice I didn't use DevOps, I've noticed that the term has gotten some negative vibes as of late) using APIs! This post is going to highlight my "Major" breakthrough on an API call to the VMAX.
Now that you've decided to take the Red Pill and see how far the rabbit hole goes, Let's dive in!

I started my quest with the help of the the Unisphere for VMAX REST Client, which is a GUI that allows you to browse and experiment with the API calls available for the VMAX. Below is a screenshot of the API call that we will be diving into today (I know it's an extremely basic API call, but we have to start somewhere).


My next hurdle to clear was to figure out how to make this same call within Python and fortunately, along came Paul Martin (@rawstorage) to introduce me to the PyU4V Project, where some genius engineers at EMC took the initiative to help the community out and put in some tremendous leg work in making this leap into the VMAX API world much less daunting.

At this point, now that I had PyU4V setup, configured, & running, I wanted to take a step back and learn (at it's base) what was truly happening behind the scenes. I like to take a look under the hood and learn how something works before I just jump whole heartedly into using it because it gives me a better perspective and base to work with later down the road.

I tore apart the modules within PyU4V and with a bit of cohersing, I was able to come up with a way to make the call outside the tool and pull back the results I was wanting in a JSON format. Below is that simple Python Script/Call to accomplish the same thing we did with the RESTClient from above (GitHub Project).


This may not seem like much at the moment, but we will be taking this building block and working on creating a reporting tool which will give us much more visibility into the array, and even further down that road, maybe even taking some automated action against the array based on the input from the API call.

Thanks for sticking with me for another episode of this adventure. Let's continue to see where this takes us!

Whats up Next?



    Now that we have a simple API call to build upon, I plan to work down the route of fleshing out the Python Script to pull in all LUNs Storage Capacity & Allocated Percent and format it in a usable fashion. This will set us up for our next step of integrating it it into a monitoring tool for visualization.

    Tools Used in the Making of this Episode



      • PyCharm: Python IDE that seems to have favor of the community
      • PyU4V Project: GUI for building API Calls to the VMAX


      Special Thanks