diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2019-04-01 15:30:53 -0400 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-05-21 16:25:18 +0100 |
commit | b14f181e4c644cd859671cd49ac8c4c3cfb57a1f (patch) | |
tree | a8c6e64dd98a3f1ec563c58517151a6975a24647 | |
parent | 935141bb62684f1e6ac3680f2dc522d3c7ad91f2 (diff) | |
download | sos-b14f181e4c644cd859671cd49ac8c4c3cfb57a1f.tar.gz |
[podman] Write command output to relevant subdir
Updates the plugin to write command output for specific containers,
images, volumes, etc... to a subdir named for that resource.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | sos/plugins/podman.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sos/plugins/podman.py b/sos/plugins/podman.py index 27a8eb1a..cbf7669c 100644 --- a/sos/plugins/podman.py +++ b/sos/plugins/podman.py @@ -70,19 +70,22 @@ class Podman(Plugin, RedHatPlugin, UbuntuPlugin): volumes = self._get_podman_list(vol_cmd) for container in containers: - self.add_cmd_output("podman inspect %s" % container) + self.add_cmd_output("podman inspect %s" % container, + subdir='containers') for img in images: name, img_id = img.strip().split() insp = name if 'none' not in name else img_id - self.add_cmd_output("podman inspect %s" % insp) + self.add_cmd_output("podman inspect %s" % insp, subdir='images') for vol in volumes: - self.add_cmd_output("podman volume inspect %s" % vol) + self.add_cmd_output("podman volume inspect %s" % vol, + subdir='volumes') if self.get_option('logs'): for con in containers: - self.add_cmd_output("podman logs -t %s" % con) + self.add_cmd_output("podman logs -t %s" % con, + subdir='containers') def _get_podman_list(self, cmd): ret = [] |