-
Notifications
You must be signed in to change notification settings - Fork 3
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
Capability collector #60
Conversation
This interface defines methods to be implemented by utilities to collect Drive capabilities.
- Capabilities seemed a more apt name for this and so the methods and the types were renamed, the shared Capability type is included in bmc-toolbox/common - DriveFeatures renamed to DriveCapabilities - The DriveCapabilities methods returns a []*common.Capabilities type - Pass in context before command execution - Lower case methods that are not exported
…the OS/kernel drive name
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.
Looking good, and I agree that capabilities is more apt than features.
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.
This also looks good, I had meant to include it.
….go device This allows the mock fakelsblk to be included in the inventory tests
Various other data fixes based changes on fixes to vetChanges()
This is required for the the dell provider tests and the actions tests to be able to run mock fake lsblk, nvme, hdparm executor, we need to come up with a better way than specifying the relative path to the fixture.
At the moment this code is limited to checking capabilities on SATA and NVME drives.
This is done, since the lsblk fixture data in fixtures/utils/lsblk/json corelates to the drives in the Dell fixture - the serial numbers match. And since the lsblk fixture does not include drives that match the SMC fixture serials, the capabilities data is removed from the SMC fixture.
d5d627d
to
a70a29a
Compare
The final set of changes are -
|
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.
The additional updates look solid to me, and vetUpdate() in particular is definitely easier to understand now. Thanks for all this work!
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.
Nothing jumped out at me as being obviously wrong or bad form. I noticed us hard coding some specific capability names in utils/nvme.go and wonder if maybe that should be moved into something common, but I didn't feel it was something that would hold up approval.
What does this PR do
The
actions.Collect
inventory method now returns drive capabilities.Based on @psteinbachs work to add
hdparm
,nvme
drive feature collection,this change set defines and implements the
DriveCapabilities()
interface.Device.Common
struct was extended to include[]*Capabilities
that are thenreturned by the
hdparm
,nvme
drive capability collectors.Capabilities
seemed a more apt name instead ofFeatures
theDriveCapability
methods in thenvme
,hparm
were renamed and a[]*common.Capability
is returned.nvme
,hdparm
command execution.This change depends on bmc-toolbox/common#4