[racktables-users] Re: Locate LED

  • From: Denis Ovsienko <infrastation@xxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Fri, 23 Apr 2010 15:31:16 +0400

> Yes, I use the ipmitool tool :-) to set led stati. My question was
> rather as how/where to include this in RT? I mean to get a
> button/checkbox/whaterver on the properties panel of my Server object.

The simplest way is to add a dedicated IPMI tab for that, for that you'd need 
to look into navigation.php and add a couple of functions there: one (look for 
samples in interface.php) to render a panel with a "fire" button (and with some 
radios or whatever is needed), and another (samples in ophandler.php) to handle 
the pressing of that button. The latter function would actually call the 
ipmitool to do something.

And, if you'd want it to look more consistently, you'd need to register a third 
function (trigger), which would tell, if your IPMI panel works with a 
particular object or not. Then the tab would be only displayed where it makes 
use (and not on every switch, patch panel and so).

Once you finish that, you can put all that into local.php and your addon will 
likely survive RackTables upgrades (and you can put it into contribs directory 
of RackTables, if you want).

--
    Denis Ovsienko

Other related posts: