aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2019-01-04 15:02:55 -0500
committerBryn M. Reeves <bmr@redhat.com>2019-01-18 18:12:34 +0000
commit12f12d490866587b254cdf182585529714b7e5bc (patch)
tree69e6421398c8256c0cd85c02db20ee5c1880f645
parentff9b64ffb383b5b57cbba6de665d2b7794849be7 (diff)
downloadsos-12f12d490866587b254cdf182585529714b7e5bc.tar.gz
[rpmostree] Add new plugin
Adds a new plugin for rpm-ostree, which is no longer limited to use in Atomic Host. Resolves: #1529 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/atomichost.py1
-rw-r--r--sos/plugins/rpmostree.py40
2 files changed, 40 insertions, 1 deletions
diff --git a/sos/plugins/atomichost.py b/sos/plugins/atomichost.py
index deecba87..0c1f4026 100644
--- a/sos/plugins/atomichost.py
+++ b/sos/plugins/atomichost.py
@@ -25,7 +25,6 @@ class AtomicHost(Plugin, RedHatPlugin):
return self.policy.in_container()
def setup(self):
- self.add_copy_spec("/etc/ostree/remotes.d")
self.add_cmd_output("atomic host status")
if self.get_option('info'):
diff --git a/sos/plugins/rpmostree.py b/sos/plugins/rpmostree.py
new file mode 100644
index 00000000..3c6872c2
--- /dev/null
+++ b/sos/plugins/rpmostree.py
@@ -0,0 +1,40 @@
+# Copyright (C) 2019 Red Hat, Inc., Jake Hunsaker <jhunsake@redhat.com>
+
+# This file is part of the sos project: https://github.com/sosreport/sos
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions of
+# version 2 of the GNU General Public License.
+#
+# See the LICENSE file in the source distribution for further information.
+
+from sos.plugins import Plugin, RedHatPlugin
+
+
+class Rpmostree(Plugin, RedHatPlugin):
+ """rpm-ostree image/package system"""
+
+ plugin_name = 'rpmostree'
+ packages = ('rpm-ostree',)
+
+ def setup(self):
+ self.add_copy_spec('/etc/ostree/remotes.d/')
+
+ subcmds = [
+ 'status',
+ 'db list',
+ 'db diff',
+ '--version'
+ ]
+
+ self.add_cmd_output(["rpm-ostree %s" % subcmd for subcmd in subcmds])
+
+ units = [
+ 'rpm-ostreed',
+ 'rpm-ostreed-automatic',
+ 'rpm-ostree-bootstatus'
+ ]
+ for unit in units:
+ self.add_journal(unit)
+
+# vim: set et ts=4 sw=4 :