UCS Scripting with minidom and Python 2.7

Blog Post created by srehling on Sep 23, 2015

I am brand new to Python scripting having spent most of my time in PowerShell over the last several years. What follows is intended as an example of the methods I found to get data from Cisco UCS without using the Cisco APIs.


Attached is an example Python script for obtaining inventory from a UCS Manager environment or a stand alone C series server. This is not intended to to be a functional application as much as it provides a method for getting to UCS inventory information without using the SDK. Many of my customers use python versions that are part of the RedHat repository, which means most of them are using Python 2.6 or 2.7. The following examples were written for Python 2.7 and uses minidom to handle XML processing.