-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2/3] New firmware interfaces #362
Conversation
type FirmwareInstaller interface { | ||
// FirmwareInstall uploads firmware update payload to the BMC returning the task ID | ||
// | ||
// parameters: | ||
// component - the component slug for the component update being installed. | ||
// applyAt - one of "Immediate", "OnReset". | ||
// operationsApplyTime - one of the OperationApplyTime constants |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make that a type instead of constants of string
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that is the intention going ahead in the newer interface, for now we don't want to break the current interface.
} | ||
|
||
// firmwareInstallUploaded uploads and initiates firmware update for the component | ||
func firmwareInstallUploaded(ctx context.Context, component, uploadTaskID string, generic []firmwareInstallerWithOptionsProvider) (installTaskID string, metadata Metadata, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I think named returns are a maintenance hazard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kinda agree, although I have them there since they are indicative of what the returned string holds.
Since we need to accept more than just those two OperationApplyTime parameters
…ed, task status The FirmwareTaskStatus method is to replace FirmwareInstallStatus
4004cbc
to
49efe08
Compare
rebase on parent branch |
There has been no real use for having an io.Reader passed in and this interface is to expect a file instead.
… x11, x12 based on feedback recieved this approach made more sense
[3/3] supermicro firmware install rewrite
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## redfishwrapper-changes #362 +/- ##
=========================================================
Coverage ? 45.02%
=========================================================
Files ? 60
Lines ? 5017
Branches ? 0
=========================================================
Hits ? 2259
Misses ? 2501
Partials ? 257 ☔ View full report in Codecov by Sentry. |
What does this PR implement/change/remove?
Note: to be merged after #363
Defines new firmware interface methods - to enable individual firmware actions instead of a larger abstraction like the current
FirmwareInstall
,FirmwareInstallStatus
- the abstraction in these current methods is getting to large to manage and work across vendors.FirmwareUpload
- Only upload firmwareFirmwareInstallUploaded
- Install previously uploaded firmwareFirmwareTaskStatus
- Retrieve task state along with status information, to deprecateFirmwareInstallStatus
FirmwareInstallSteps
- Returns steps the caller has to follow to install firmware for a device, since each vendor device is a special snowflake.Checklist