Feature/rfd 133 explore#133
Draft
alexlovelltroy wants to merge 3 commits into
Draft
Conversation
Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org>
* Refactor to upgrade to gofish 0.22.0 with new schemas package - Updated imports from redfish to schemas in various files to align with the new package structure. - Modified Client interface methods to return types from schemas instead of redfish. - Adjusted implementations in GenericClient to accommodate the new schemas types. - Updated tests to reflect changes in the types used for power states and reset types. - Refactored functions in collect, crawler, power, service, and update packages to utilize schemas types. - Introduced helper functions to dereference optional numeric fields for better handling of nil values. Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org> * feat: implement context-aware power operations and reset handling in BMC layer Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org> * feat: enhance power command to support flexible node identifiers and improve inventory handling Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> --------- Signed-off-by: Alex Lovell-Troy <alex@lovelltroy.org> Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new vendor-agnostic BMC (Baseboard Management Controller) client abstraction layer, enabling vendor-specific handling and plugin registration for BMC operations. It provides a unified interface for BMC interactions, a registry for vendor plugin detection and dispatch, and a manager for connection/session management. Comprehensive tests are included for all new components. The most important changes are as follows:
BMC Client Abstraction and Vendor Plugin System:
Clientinterface inpkg/bmc/client.gothat abstracts BMC operations and shields callers from vendor-specific details. Added a defaultGenericClientimplementation and a mechanism for vendor plugins to override behavior. Also defined theVendortype and error handling for unsupported operations.pkg/bmc/registry.goto allow vendor plugins to register detectors and factories. TheclientForfunction wraps a gofish client with the most specific registered vendor client or falls back to the generic client.cmd/root.goby blank-importingpkg/bmc/vendorsso theirinit()functions run and register themselves.pkg/bmc/vendors/cray/cray.gothat detects Cray BMCs and provides a placeholder for Cray-specific quirks.Connection and Session Management:
ConnConfigstruct inpkg/bmc/conn.gofor canonical BMC connection configuration, including credential resolution logic.Managerinpkg/bmc/manager.goas the single authority for opening and caching BMC sessions, performing vendor detection, and managing session lifecycles.Testing and Validation:
pkg/bmc/client_test.go), connection configuration (pkg/bmc/conn_test.go), manager/session logic (pkg/bmc/manager_test.go), and plugin registry (pkg/bmc/registry_test.go). [1] [2] [3] [4]For more info, see Contributing Guidelines.