Skip to content

Commit

Permalink
[networking] Capture /etc/nmstate folder
Browse files Browse the repository at this point in the history
Capture configuration files, .yml and .applied
files in /etc/nmstate folder.

Resolves: #3791

Signed-off-by: Jose Castillo <[email protected]>
  • Loading branch information
pmoravec committed Nov 13, 2024
1 parent a2bac16 commit 20fc35f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sos/report/plugins/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def setup(self):
"/sys/class/net/*/device/numa_node",
"/sys/class/net/*/flags",
"/sys/class/net/*/statistics/",
"/etc/nmstate/",
])

self.add_forbidden_path([
Expand Down Expand Up @@ -308,6 +309,14 @@ def setup(self):

super().setup()

def postproc(self):

self.do_path_regex_sub(
"/etc/nmstate",
r"(\s+(mka-cak|private-key-password|psk|password):).*",
r"\1 ******"
)


class UbuntuNetworking(Networking, UbuntuPlugin, DebianPlugin):
trace_host = "archive.ubuntu.com"
Expand Down

0 comments on commit 20fc35f

Please sign in to comment.