Skip to content

Commit

Permalink
fix: remove /dev, /boot and /sys/firmware from ls_lanR (#4347)
Browse files Browse the repository at this point in the history
- as the original specs are kept as they are, we don't need
  to collection them two times.

Signed-off-by: Xiangce Liu <[email protected]>
  • Loading branch information
xiangce authored Feb 6, 2025
1 parent 9e933da commit 263aaa7
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions insights/parsers/ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
LSlaZ - command ``ls -lanZ <dirs>``
-----------------------------------
"""

from insights.core import ls_parser, Parser
from insights.core.filters import add_filter
from insights.core.plugins import parser
Expand All @@ -41,13 +42,6 @@
add_filter(Specs.ls_la_filtered, ['total '])
add_filter(Specs.ls_lan_filtered, ['total '])

# Required directories to collect for `LSlanR` specs, to:
# 1. keep compatible with sosreport archives
# 2. Ensure that the related applications to work properly:
# - archive data extraction (cee-data-engineering)
# - insights-facts (cee-data-engineering)
add_filter(Specs.ls_lanR_dirs, ['/boot', '/dev', '/sys/firmware'])


class FileListing(Parser, dict):
"""
Expand Down Expand Up @@ -158,6 +152,7 @@ class FileListing(Parser, dict):
>>> fp.perms_owner
'rw-'
"""

__root_path = None
"""
The root path of the dir when there is only one list target. It only works
Expand Down Expand Up @@ -279,6 +274,7 @@ class LSla(FileListing):
Parses output of ``ls -la <dirs>`` command.
See :py:class:`FileListing` for more information.
"""

pass


Expand All @@ -288,6 +284,7 @@ class LSlaFiltered(FileListing):
Parses output of ``ls -la <dirs> | grep -F <keywords>`` command.
See :py:class:`FileListing` for more information.
"""

pass


Expand All @@ -297,6 +294,7 @@ class LSlan(FileListing):
Parses output of ``ls -lan <dirs>`` command.
See :py:class:`FileListing` for more information.
"""

pass


Expand All @@ -306,6 +304,7 @@ class LSlanFiltered(FileListing):
Parses output of ``ls -lan <dirs> | grep -F <keywords>`` command.
See :py:class:`FileListing` for more information.
"""

pass


Expand All @@ -315,6 +314,7 @@ class LSlanL(FileListing):
Parses output of ``ls -lanR <dirs>`` command.
See :py:class:`FileListing` for more information.
"""

pass


Expand All @@ -324,6 +324,7 @@ class LSlanR(FileListing):
Parses output of ``ls -lanR <dirs>`` command.
See :py:class:`FileListing` for more information.
"""

pass


Expand All @@ -333,6 +334,7 @@ class LSlanRL(FileListing):
Parses output of ``ls -lanRL <dirs>`` command.
See :py:class:`FileListing` for more information.
"""

pass


Expand All @@ -342,6 +344,7 @@ class LSlaRZ(FileListing):
Parses output of ``ls -laRZ <dirs>`` command.
See :py:class:`FileListing` for more information.
"""

pass


Expand All @@ -351,4 +354,5 @@ class LSlaZ(FileListing):
Parses output of ``ls -laZ <dirs>`` command.
See :py:class:`FileListing` for more information.
"""

pass

0 comments on commit 263aaa7

Please sign in to comment.