Posts Tagged ‘python

19 – DRAC management with python

So i had to create a script to deploy a lot of systems on dell hardware, this was the second time i had been faced with this problem. The first time i was faced with the issue i just created a wrapper function around the dell racadm binary. I always felt this was a bit of a hack so this time i decided to create a nicer hack :).

the racadm binary is sluggish to say the least and the output is not the easiest to parse. i figured there must be a better way, a quick google showed that i wasn’t the only one to get frustrated with this and it turned out that the racadm tool seemed to rely on a web cgi page. with this knowledge it turned out tat it was pretty simple to create a python implementation of racadm.

I wrote the library some time ago however we are using it in our internal deployment scrips and it seems pretty successful. A basic example showing how to reset the rac interface would be

import random
rac = racadm.Racadm('', 'root', 'calvin')