Project

General

Profile

Feature #2595

Expose more existing rubyipmi features as BMC smart-proxy APIs

Added by Konstantin Orekhov over 6 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
BMC
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:

Description

Additional BMC features in smart-proxy to expose already existing ones in rubyipmi/ipmitool (0.5.1)

- fru list
- bmc info
- power reset
- sel
- 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.

Associated revisions

Revision a9332b68 (diff)
Added by Nick L. over 2 years ago

Fixes #2595 - Add more Rubyipmi methods to BMC API

Replaces: theforeman/smart-proxy#505
Replaces: 051b285aaa9b595ea9513ff5fa197eb830b942c1

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",
and "asset_tag"
- 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
logicminds/rubyipmi/blob/master/spec/unit/ipmitool/fru_spec.rb
- 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

History

#1 Updated by Dominic Cleal over 6 years ago

  • Category set to BMC
  • Status changed from New to Assigned
  • Assignee set to Konstantin Orekhov

#2 Updated by Konstantin Orekhov about 6 years ago

Submitted another enhancement request to add SEL (system event log) feature to rubyipmi - https://github.com/logicminds/rubyipmi/issues/6
in addition to https://github.com/logicminds/rubyipmi/issues/7 to add "sensors/get <sensor name>".

#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.

https://github.com/theforeman/smart-proxy/blob/develop/modules/bmc/ipmi.rb

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.

#4 Updated by The Foreman Bot over 2 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/smart-proxy/pull/505 added

#5 Updated by The Foreman Bot over 2 years ago

  • Pull request https://github.com/theforeman/smart-proxy/pull/521 added

#6 Updated by Nick L. over 2 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#7 Updated by Konstantin Orekhov about 2 years ago

Nick Liu wrote:

Applied in changeset a9332b68542b3a4473cd1ce84c8740c093e21f3a.

Is this feature released? If so, which version of Foreman this is included in?

#8 Updated by Marek Hulán about 2 years ago

This added new API endpoints to Foreman proxy. Based on date, I think it is in 1.15. I don't see any change in Foreman that would use it.

#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.

Also available in: Atom PDF