aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2018-04-19 15:16:01 +0100
committerBryn M. Reeves <bmr@redhat.com>2018-04-19 15:17:03 +0100
commit26c45f41c527f1193aa4a12814d7d07f5505fe07 (patch)
treed3fe8126e165d097ffc2c14556f2e532ad012444
parentb5d931650529e22f044a6120938a027ec46f74de (diff)
downloadsos-26c45f41c527f1193aa4a12814d7d07f5505fe07.tar.gz
[yum] add plugin name list, package list, and config files
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/yum.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py
index 043f794c..1db5189a 100644
--- a/sos/plugins/yum.py
+++ b/sos/plugins/yum.py
@@ -13,6 +13,9 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from sos.plugins import Plugin, RedHatPlugin
+import os
+
+YUM_PLUGIN_PATH = "/usr/lib/yum-plugins/"
class Yum(Plugin, RedHatPlugin):
@@ -44,6 +47,21 @@ class Yum(Plugin, RedHatPlugin):
# Get a list of channels the machine is subscribed to.
self.add_cmd_output("yum -C repolist")
+ # Get list of available plugins and their configuration files.
+ if os.path.exists(YUM_PLUGIN_PATH) and os.path.isdir(YUM_PLUGIN_PATH):
+ plugins = ""
+ names = ""
+ for p in os.listdir(YUM_PLUGIN_PATH):
+ if not p.endswith(".py"):
+ continue
+ plugins = plugins + " " if len(plugins) else ""
+ plugins = plugins + os.path.join(YUM_PLUGIN_PATH, p)
+ names += "%s\n" % p[:-3]
+ self.add_cmd_output("rpm -qf %s" % plugins)
+ self.add_string_as_file(names, "plugin-names")
+
+ self.add_copy_spec("/etc/yum/pluginconf.d")
+
# candlepin info
self.add_forbidden_path("/etc/pki/entitlement/key.pem")
self.add_forbidden_path("/etc/pki/entitlement/*-key.pem")