Expose more existing rubyipmi features as BMC smart-proxy APIs
Additional BMC features in smart-proxy to expose already existing ones in rubyipmi/ipmitool (0.5.1)
- fru list
- bmc info
- power reset
- bmc ip source (dhcp/static)
- bmc reset <cold|warm> (this one needs to be added to rubyipmi library first, https://github.com/logicminds/rubyipmi/issues/4)
I'll be working on the above and submit a pull request.
Fixes #2595 - Add more Rubyipmi methods to BMC API
This commit implements the same features as
051b285aaa9b595ea9513ff5fa197eb830b942c1, with some differences:
- Added unit tests for all new features
- Added interfaces to `modules/bmc/base.rb`
- Cleared up some ambiguous method names
- Changed some unit test stubs to expects
- Fixed bugs in the original implementation
New API methods:
- GET /bmc/:host/fru
Shows available actions: "list", "serial", "manufacturer", "model",
- GET /bmc/:host/bmc
Shows available actions: "info", "guid", and "version"
- GET /bmc/:host/sensors
Shows available actions: "list", "count", "names", "fanlist",
"templist", and "get"
- GET /bmc/:host/lan/snmp
Shows BMC host's SNMP community string
- GET /bmc/:host/lan/vlanid
Shows BMC host's VLAN ID
- GET /bmc/:host/lan/ipsrc
Shows whether BMC host's LAN was configured "static" or "dhcp"
- GET /bmc/:host/lan/print
Shows BMC hosts's LAN configuration
- PUT /bmc/:host/chassis/power/reset
Performs power reset on chassis
- GET /bmc/:host/fru/list
Shows all of host's FRU information. Includes workaround for
undocumented IBM/Lenovo IPMI bug.
- GET /bmc/:host/fru/serial
Shows host's serial number
- GET /bmc/:host/fru/manufacturer
Shows host's manufacturer
- GET /bmc/:host/fru/model
Shows host's product model
- GET /bmc/:host/fru/asset_tag
Shows host's asset tag string, if Rubyipmi has this method. It's in
the spec, but doesn't seem to be implemented today. See
- GET /bmc/:host/bmc/info
Shows information about the BMC
- GET /bmc/:host/bmc/guid
Shows system's GUID
- GET /bmc/:host/version
Shows BMC's version
- PUT /bmc/:host/bmc/reset?type=warm
Performs warm reset on BMC
- PUT /bmc/:host/bmc/reset?type=cold
Performs cold reset on BMC
- GET /bmc/:host/sensors/list
Shows all of host's sensors
- GET /bmc/:host/sensors/count
Shows number of sensors on host
- GET /bmc/:host/sensors/names
Shows list of sensor names on host
- GET /bmc/:host/sensors/fanlist
Shows all of host's fan sensors
- GET /bmc/:host/sensors/templist
Shows all of host's temperature sensors
- GET /bmc/:host/sensors/get
Shows available option "sensor" for this action
- GET /bmc/:host/sensors/get/:sensor
Shows information about sensor :sensor on host
#3 Updated by Corey Osman over 4 years ago
- Description updated (diff)
I think this could be achieved by using the forwardable pattern or using @conn as a delegate to expose all the commands to the BMC ipmi class.
It would be a lot of refactoring but definitely worth it since all Rubyipmi commands would be exposed automatically which we could probably write a smart enough BMC API call to run virtually any command and return 501 if its not implemented.
#9 Updated by Nick L. about 2 years ago
Konstantin Orekhov wrote:
Nick Liu wrote:
Applied in changeset a9332b68542b3a4473cd1ce84c8740c093e21f3a.
Is this feature released? If so, which version of Foreman this is included in?
These new API methods were introduced in Smart Proxy 1.16. Foreman 1.16, however, does not use any of these new API methods.