From 50fdcb2feba1d0135002f0e1b3cc8e7bdda07b98 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Fri, 29 Nov 2024 23:25:21 +0000 Subject: [PATCH] [sunbeam] Fix obfuscation for masakari and url Signed-off-by: Arif Ali --- sos/report/plugins/sunbeam_hypervisor.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sos/report/plugins/sunbeam_hypervisor.py b/sos/report/plugins/sunbeam_hypervisor.py index 167a1ed149..28242b7cbe 100644 --- a/sos/report/plugins/sunbeam_hypervisor.py +++ b/sos/report/plugins/sunbeam_hypervisor.py @@ -65,13 +65,20 @@ def postproc(self): ] connection_keys = ["connection", "sql_connection"] + openstack_folders = [ + "nova", + "neutron", + "ceilometer", + "masakarimonitors", + ] + self.do_path_regex_sub( - fr"{self.common_dir}/etc/(nova|neutron|ceilometer)/*", + fr'{self.common_dir}/etc/({"|".join(openstack_folders)})/*', fr'(^\s*({"|".join(protect_keys)})\s*=\s*)(.*)', r"\1*********" ) self.do_path_regex_sub( - fr"{self.common_dir}/etc/(nova|neutron|ceilometer)/*", + fr'{self.common_dir}/etc/({"|".join(openstack_folders)})/*', fr'(^\s*({"|".join(connection_keys)})\s*=\s*(.*)' r'://(\w*):)(.*)(@(.*))', r"\1*********\6" @@ -87,6 +94,7 @@ def postproc(self): "ovn_cacert", "ovn_cert", "ovn_key", + "url", ] self.do_file_sub(