I've been trying to work out a way of executing SMA runbooks from some of our linux systems.
so I have knocked together a crude python script that can be further extended for doing such a task..
python isn't my language of choice - this is probably quite apparent in the lack of classes etc.
typically SMA uses ODATA for the interface via REST - this was proving too much of an issue, so I resorted to regex and extracting the data from the XML that I needed.. Initially I was going to use XPATH to do it, but things like elementtree didn't seem to like the 'XML'.
Below is a pic of the output:
Anyway I have uploaded the script to my codeplex site located here: http://smaworkflows.codeplex.com/SourceControl/latest#Python/SMARunbooks.py
Also a thanks should be mentioned to Laurie Rhodes for the information provided here:
http://www.laurierhodes.info/?q=node/105
I try to specialise in doing the out of the ordinary stuff (A Challenge!) - And generally making life as easy as possible using any of the technologies within reach without having to re-invent the wheel where possible! Technologies and products can include -> .NET, VBS, Powershell, DSC, Systems Center, NetApp, VMWare, Windows Server, Linux, Python, Microcontrollers and others!
No comments:
Post a Comment