Repository navigation
Conversation
a531108 to
2844ccb
Compare
|
@nuxster would you want to create a new MR or rebase this one on main to have it merged? |
2844ccb to
23ce822
Compare
|
@joelrebel I did rebase on main in this PR |
|
Hey @nuxster, thanks for your patience, To cover as much ground in this PR I made use use of Gemini 2.5 Pro, Please do try to create separate commits for each logical change, that helps with the manual review process :) Everything after this line is written by the agent and you may share it directly with your agent to have it implement the required changes. To finalize this PR for merging, we request a refactoring that fully leverages the existing Below is a two-part action plan. Part 1: Improve Encapsulation in the
|
|
@joelrebel It seems to have taken into account all the requirements. Please check it out. |
|
Hey @joelrebel . I'm concerned about the amount of code and the usefulness of these new interfaces. Are the interfaces only implement-able with gofish? If so, I don't see the value in growing the code base to support them. User's would be better served using gofish directly. Secondly, I think this introduces too many interfaces all at once. This makes it difficult to refine the interfaces. Many of them need updating to be smaller and have improved naming. Reference. I suggest we start small and work into the use cases to make sure they are reviewed and scrutinized properly and that we can support them over the long haul. Thoughts? |
@jacobweinstock from a pure hardware lifecycle management perspective, I see value in bmclib providing functions to manage Secure boot, Certificates and other features suggested in this PR. Although, this PR does introduce quite a few new wrapper interfaces for a single provider. An option here, could be to have the provider implementation added without the new wrapper interfaces - in separate PRs, following the style guide, this way we enable support for the hardware. Once there's a need to expose the same functions for another vendor the wrapper interfaces can be added. IMO bmclib's position is to provide functions for hardware lifecycle management, while covering for vendor edge cases, working with the various protocols that BMCs support. That said, Redfish is getting to be standardized and has better coverage for management and such use cases would have to determine where/if bmclib continues to provide value. I will go through the PR closely once I'm back from time off to determine where if Gofish could be used directly |
b7d1dc7 to
fa82191
Compare
|
Rebased on current What does this PR implement/change/remove?Adds optional new New optional
|
Adds optional bmc core interfaces (secure boot, thermal, power capping, volume management, license, secure key lifecycle, network, serial, event subscription, telemetry, jobs, certificates, SNMP) with their feature constants and client-level FromInterfaces plumbing. Assisted-by: Anthropic Claude (Claude Code, Opus model)
Implements the optional bmc core interfaces in the Lenovo XCC provider (thermal, secure boot, power capping, volume management, license, secure key lifecycle, network, serial, events, telemetry, jobs, certificates, SNMP), advertises the corresponding feature flags, and adds the lenovo-smoketest hardware example and provider tests. Assisted-by: Anthropic Claude (Claude Code, Opus model)
fa82191 to
3b70fa0
Compare
What does this PR implement/change/remove?
Adds optional new
bmccore interfaces for extended Redfish capabilities, the generic dispatch andbmclib.Clientmethods that expose them, and the Lenovo XCC provider implementations for those interfaces. Purely additive — does not modifyinternal/redfishwrapper, existingbmcinterfaces, or other providers; backward-compatible by construction.New optional
bmccore interfacesSecureBootManager,ThermalReader,PowerReader/PowerCapSetter,VolumeManager,LicenseManager,SecureKeyLifecycle,NetworkInterfaceGetter/Setter,NetworkProtocolGetter/Setter,SerialInterfaceGetter/Setter,EventSubscriber,TelemetryReader,JobManager,CertificateManager,SNMPConfigurer— plus their neutral request/response structs.Client wiring
bmc/extended.go— generic*FromInterfacesdispatch (runProviderRead/runProviderAction, Go 1.21 generics), following the existing dispatch pattern.client_features.go—bmclib.Clientmethods for the new interfaces, with the same contract as existingClientmethods (trace span, per-provider timeout, metadata, span attributes).providers/providers.go— 19 newproviders.Feature*registry constants.Lenovo XCC provider implementations
The
lenovoprovider gains implementations for all of the above (advertised via the registry), bringing its total to 45 features: secure boot, thermal read, power read & capping, storage/volume read + management, license management, secure-key lifecycle, network interface/protocol & serial get/set, event subscriptions, telemetry, jobs, certificates, and SNMP.Smoke-test harness
examples/lenovo-smoketest/— a read-only-by-default end-to-end harness (mutations double-gated behind-allow-writes+ a per-operation flag), aRUNBOOK.md, aHARDWARE-TEST-PLAN.md, and a read-onlydump-xcc.shresource dumper. This was used as the hardware release gate.This is the initial implementation and the start of ongoing work, not a final/exhaustive one. XCC firmware keeps evolving and there is likely variance across ThinkSystem generations/models. The provider is validated end-to-end on a ThinkSystem SR630 V2 (XCC, Redfish 1.14.0) and reconciled against a live resource dump. Known deferred items: AccountService LDAP/lockout, CSR
KeyPairAlgorithm/KeyCurveId, and LicenseService path variance (some firmware levels do not expose/redfish/v1/LicenseService— handled as an empty result rather than an error).XCC-specific native behavior (each HW-validated)
CommunityNamesis read from the top level of the OEM SNMP resource (not nested underSNMPTraps).MetricPropertyon XCC (e.g.…/Power#/.../MaxConsumedWatts), surfaced viaMetricPropertyon the neutral metric value.{"PowerControl":[{"PowerLimit":{"LimitInWatts":n}}]}.Checklist
The HW vendor this change applies to (if applicable)
Lenovo
The HW model number, product name this change applies to (if applicable)
Lenovo ThinkSystem SR630 V2 (validated). Built against the generic XCC Redfish API; expected to work across XCC-based ThinkSystem servers.
The BMC firmware and/or BIOS versions that this change applies to (if applicable)
XClarity Controller (XCC), Redfish 1.14.0 on the validated unit. Reconciled against a live XCC resource dump.
What version of tooling - vendor specific or opensource does this change depend on (if applicable)
Go 1.21;
github.com/stmcginnis/gofishv0.22.0 (transitive viainternal/redfishwrapper); no vendor-specific tooling.AI tool disclosure. This contribution was developed with the assistance of Anthropic's Claude (via Claude Code), primarily the Claude Opus model. AI was used for code generation, test scaffolding, and documentation. Code analysis, manual testing on real hardware (Lenovo ThinkSystem SR630 V2, XCC Redfish 1.14.0), and code refinement were carried out by me personally.
Description for changelog/release notes