Blame SOURCES/sos-bz1209840-kimchid-plugin.patch

c81b6a
From 3aabd18b2666dbbeb86871ac4b9f025e468d5818 Mon Sep 17 00:00:00 2001
c81b6a
From: Christy Perez <christy@linux.vnet.ibm.com>
c81b6a
Date: Tue, 16 Dec 2014 12:46:27 +0000
c81b6a
Subject: [PATCH] [kimchi] add new plugin
c81b6a
c81b6a
This plugin gathers kimchi logs and configuration files.
c81b6a
c81b6a
Kimchi is an HTML5-based virtualization-management platform
c81b6a
For more information, please visit:
c81b6a
https://github.com/kimchi-project/kimchi/wiki
c81b6a
c81b6a
Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
c81b6a
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
c81b6a
---
c81b6a
 sos/plugins/kimchi.py | 40 ++++++++++++++++++++++++++++++++++++++++
c81b6a
 1 file changed, 40 insertions(+)
c81b6a
 create mode 100644 sos/plugins/kimchi.py
c81b6a
c81b6a
diff --git a/sos/plugins/kimchi.py b/sos/plugins/kimchi.py
c81b6a
new file mode 100644
c81b6a
index 0000000..613b2c9
c81b6a
--- /dev/null
c81b6a
+++ b/sos/plugins/kimchi.py
c81b6a
@@ -0,0 +1,40 @@
c81b6a
+# Copyright IBM, Corp. 2014, Christy Perez <christy@linux.vnet.ibm.com>
c81b6a
+
c81b6a
+# This program is free software; you can redistribute it and/or modify
c81b6a
+# it under the terms of the GNU General Public License as published by
c81b6a
+# the Free Software Foundation; either version 2 of the License, or
c81b6a
+# (at your option) any later version.
c81b6a
+
c81b6a
+# This program is distributed in the hope that it will be useful,
c81b6a
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
c81b6a
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c81b6a
+# GNU General Public License for more details.
c81b6a
+
c81b6a
+# You should have received a copy of the GNU General Public License
c81b6a
+# along with this program; if not, write to the Free Software
c81b6a
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
c81b6a
+
c81b6a
+from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin
c81b6a
+
c81b6a
+
c81b6a
+class Kimchi(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
c81b6a
+    """kimchi-related information
c81b6a
+    """
c81b6a
+
c81b6a
+    plugin_name = 'kimchi'
c81b6a
+    packages = ('kimchi',)
c81b6a
+
c81b6a
+    def setup(self):
c81b6a
+        log_limit = self.get_option('log_size')
c81b6a
+        if not self.get_option('all_logs'):
c81b6a
+            self.add_copy_spec_limit('/var/log/kimchi/*.log',
c81b6a
+                                     sizelimit=log_limit)
c81b6a
+            self.add_copy_spec_limit('/etc/kimchi/kimchi*',
c81b6a
+                                     sizelimit=log_limit)
c81b6a
+            self.add_copy_spec_limit('/etc/kimchi/distros.d/*.json',
c81b6a
+                                     sizelimit=log_limit)
c81b6a
+        else:
c81b6a
+            self.add_copy_spec('/var/log/kimchi/')
c81b6a
+            self.add_copy_spec('/etc/kimchi/')
c81b6a
+
c81b6a
+# vim: expandtab tabstop=4 shiftwidth=4
c81b6a
-- 
c81b6a
1.8.3.1
c81b6a
c81b6a
From cb9805d129827178df5b32fc681f629d4f40ac6e Mon Sep 17 00:00:00 2001
c81b6a
From: "Bryn M. Reeves" <bmr@redhat.com>
c81b6a
Date: Tue, 10 Feb 2015 19:09:26 +0000
c81b6a
Subject: [PATCH] [kimchi] fix collection of /etc/kimchi
c81b6a
c81b6a
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
c81b6a
---
c81b6a
 sos/plugins/kimchi.py | 2 +-
c81b6a
 1 file changed, 1 insertion(+), 1 deletion(-)
c81b6a
c81b6a
diff --git a/sos/plugins/kimchi.py b/sos/plugins/kimchi.py
c81b6a
index 613b2c9..efb469e 100644
c81b6a
--- a/sos/plugins/kimchi.py
c81b6a
+++ b/sos/plugins/kimchi.py
c81b6a
@@ -26,6 +26,7 @@ class Kimchi(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
c81b6a
 
c81b6a
     def setup(self):
c81b6a
         log_limit = self.get_option('log_size')
c81b6a
+        self.add_copy_spec('/etc/kimchi/')
c81b6a
         if not self.get_option('all_logs'):
c81b6a
             self.add_copy_spec_limit('/var/log/kimchi/*.log',
c81b6a
                                      sizelimit=log_limit)
c81b6a
@@ -35,6 +36,5 @@ class Kimchi(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
c81b6a
                                      sizelimit=log_limit)
c81b6a
         else:
c81b6a
             self.add_copy_spec('/var/log/kimchi/')
c81b6a
-            self.add_copy_spec('/etc/kimchi/')
c81b6a
 
c81b6a
 # vim: expandtab tabstop=4 shiftwidth=4
c81b6a
-- 
c81b6a
1.8.3.1
c81b6a