dellcloudedge/barclamp-crowbar — pull request #8 by bpezan (2012-01-27 22:35:11+00:00)
Title: bmc user and password for ipmi commands / links

the ipmitool commands used via the UI and `crowbar machines (shutdown|poweron|reboot|identify)` are hardcoded with the user and password of "crowbar", but the ipmi proposal allows configuring these values. if the values are changed in the proposal and on the BMCs, all ipmitool commands fail. this commit will query the ipmi proposal for the bmc_user and bmc_password values to be used in all ipmitool commands. it also enables the use of lanplus ipmi interface in order to allow bmc_passwords longer than 16 characters.

i also changed the logic in the shutdown and poweron functions to match that of reboot and identify. i want to say that they didn't work otherwise, but i'm not %100 sure about that. however, this code allows all ipmi functions to work with any user or password, even passwords greater than 16 characters.

the current behavior of UI seems to disable all ipmi links if the node is in the "shutdown" state, but the "power on" link should be visible, otherwise it provides no value. unfortunately, i've not figured this out yet. perhaps i'll get to it in later pull request.