|
|
3d26a2 |
From f1a7aea0f45485cbe12e95f38c6b0dc6ad12dd58 Mon Sep 17 00:00:00 2001
|
|
|
3d26a2 |
From: Poornima <pkshiras@redhat.com>
|
|
|
3d26a2 |
Date: Thu, 9 Apr 2015 18:47:58 +0530
|
|
|
3d26a2 |
Subject: [PATCH] [openstack_sahara] add new plugin
|
|
|
3d26a2 |
|
|
|
3d26a2 |
Capture configuration and log data for the OpenStack Sahara project
|
|
|
3d26a2 |
(formerly Savanna). Sahara is a tool to simplify the deployment of
|
|
|
3d26a2 |
data-intensive applications in OpenStack environments.
|
|
|
3d26a2 |
|
|
|
3d26a2 |
Signed-off-by: Poornima M. Kshirsagar pkshiras@redhat.com
|
|
|
3d26a2 |
Signed-off-by: Bryn M. Reeves bmr@redhat.com
|
|
|
3d26a2 |
---
|
|
|
3d26a2 |
sos/plugins/openstack_sahara.py | 63 +++++++++++++++++++++++++++++++++++++++++
|
|
|
3d26a2 |
1 file changed, 63 insertions(+)
|
|
|
3d26a2 |
create mode 100644 sos/plugins/openstack_sahara.py
|
|
|
3d26a2 |
|
|
|
3d26a2 |
diff --git a/sos/plugins/openstack_sahara.py b/sos/plugins/openstack_sahara.py
|
|
|
3d26a2 |
new file mode 100644
|
|
|
3d26a2 |
index 0000000..f0b95e4
|
|
|
3d26a2 |
--- /dev/null
|
|
|
3d26a2 |
+++ b/sos/plugins/openstack_sahara.py
|
|
|
3d26a2 |
@@ -0,0 +1,63 @@
|
|
|
3d26a2 |
+# Copyright (C) 2015 Red Hat, Inc.,Poornima M. Kshirsagar <pkshiras@redhat.com>
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+# This program is free software; you can redistribute it and/or modify
|
|
|
3d26a2 |
+# it under the terms of the GNU General Public License as published by
|
|
|
3d26a2 |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
3d26a2 |
+# (at your option) any later version.
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+# This program is distributed in the hope that it will be useful,
|
|
|
3d26a2 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
3d26a2 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
3d26a2 |
+# GNU General Public License for more details.
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+# You should have received a copy of the GNU General Public License
|
|
|
3d26a2 |
+# along with this program; if not, write to the Free Software
|
|
|
3d26a2 |
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+class OpenStackSahara(Plugin):
|
|
|
3d26a2 |
+ """OpenStack Sahara"""
|
|
|
3d26a2 |
+ plugin_name = 'openstack_sahara'
|
|
|
3d26a2 |
+ profiles = ('openstack',)
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+ option_list = [("log", "gathers openstack sahara logs", "slow", True)]
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+ def setup(self):
|
|
|
3d26a2 |
+ self.add_copy_spec("/etc/sahara/")
|
|
|
3d26a2 |
+ self.add_cmd_output("journalctl -u openstack-sahara-all")
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+ if self.get_option("log"):
|
|
|
3d26a2 |
+ self.add_copy_spec("/var/log/sahara/")
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+class DebianOpenStackSahara(OpenStackSahara, DebianPlugin, UbuntuPlugin):
|
|
|
3d26a2 |
+ """OpenStackSahara related information for Debian based distributions."""
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+ packages = (
|
|
|
3d26a2 |
+ 'sahara-api',
|
|
|
3d26a2 |
+ 'sahara-common',
|
|
|
3d26a2 |
+ 'sahara-engine',
|
|
|
3d26a2 |
+ 'python-sahara',
|
|
|
3d26a2 |
+ 'python-saharaclient',
|
|
|
3d26a2 |
+ )
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+ def setup(self):
|
|
|
3d26a2 |
+ super(DebianOpenStackSahara, self).setup()
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+class RedHatOpenStackSahara(OpenStackSahara, RedHatPlugin):
|
|
|
3d26a2 |
+ """OpenStack sahara related information for Red Hat distributions."""
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+ packages = (
|
|
|
3d26a2 |
+ 'openstack-sahara',
|
|
|
3d26a2 |
+ 'python-saharaclient'
|
|
|
3d26a2 |
+ )
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+ def setup(self):
|
|
|
3d26a2 |
+ super(RedHatOpenStackSahara, self).setup()
|
|
|
3d26a2 |
+ self.add_copy_spec("/etc/sudoers.d/sahara")
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+
|
|
|
3d26a2 |
+# vim: et ts=4 sw=4
|
|
|
3d26a2 |
--
|
|
|
3d26a2 |
1.8.3.1
|
|
|
3d26a2 |
|