-
Notifications
You must be signed in to change notification settings - Fork 184
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
feat: add "modinfo_filtered_modules" to collect the filtered modules information #3447
Conversation
@xiangce Please help to review, thanks. |
…ltered modules * Update spec "modinfo" to filterable * Deprecate all other modinfo specs Signed-off-by: Huanhuan Li <[email protected]>
@xiangce Please help to review, thanks. |
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.
It would be better to explain or give an example of how to use the filter for this spec since the filter does not work with the directly dependent Specs.modinfo_all
.
insights/specs/__init__.py
Outdated
@@ -387,7 +387,7 @@ class Specs(SpecSet): | |||
modinfo_ixgbe = RegistryPoint() | |||
modinfo_veth = RegistryPoint() | |||
modinfo_vmxnet3 = RegistryPoint() | |||
modinfo = RegistryPoint(multi_output=True) | |||
modinfo = RegistryPoint(filterable=True) |
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.
Since removing the multi_output=True
will change the usage of the Parser, better to use another symbolink name.
insights/parsers/modinfo.py
Outdated
----------------------------------------------- | ||
for all modules listed by ``lsmod`` | ||
|
||
ModInfoAll - Command ``modinfo *(filtered modules)`` |
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.
Since there is a All
in the name ModInfoAll
, it makes me think this is the parser for all the modules loaded on this host. How about using another name? like ModuleInfo
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.
@xiangce, good to me, I'll update it.
@huali027 - please add a short description to the MR in the first comment. |
* Add new spec "modinfo_modules" to collect the filtered modules * Add another new spec "modinfo_filtered_modules" to run "modinfo filtered_modules" since the result will be filtered if the spec is filterable, and then other info without the filter words will be ignored, which is not expected. Signed-off-by: Huanhuan Li <[email protected]>
@xiangce updated based on the comments, please help to review. |
Signed-off-by: Huanhuan Li <[email protected]>
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.
It looks good to me.
…information (#3447) * feat: add "modinfo_all" back and enhance it to get modinfo for all filtered modules * Update spec "modinfo" to filterable * Deprecate all other modinfo specs Signed-off-by: Huanhuan Li <[email protected]> * feat: Add new specs instead of updating original spec directly * Add new spec "modinfo_modules" to collect the filtered modules * Add another new spec "modinfo_filtered_modules" to run "modinfo filtered_modules" since the result will be filtered if the spec is filterable, and then other info without the filter words will be ignored, which is not expected. Signed-off-by: Huanhuan Li <[email protected]> * fixes: Fix failed test Signed-off-by: Huanhuan Li <[email protected]> (cherry picked from commit b134ec5)
…information (#3447) * feat: add "modinfo_all" back and enhance it to get modinfo for all filtered modules * Update spec "modinfo" to filterable * Deprecate all other modinfo specs Signed-off-by: Huanhuan Li <[email protected]> * feat: Add new specs instead of updating original spec directly * Add new spec "modinfo_modules" to collect the filtered modules * Add another new spec "modinfo_filtered_modules" to run "modinfo filtered_modules" since the result will be filtered if the spec is filterable, and then other info without the filter words will be ignored, which is not expected. Signed-off-by: Huanhuan Li <[email protected]> * fixes: Fix failed test Signed-off-by: Huanhuan Li <[email protected]>
Signed-off-by: Huanhuan Li [email protected]
All Pull Requests:
Check all that apply: