aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlaper Fesp <flaper87@gmail.com>2013-08-27 14:32:20 +0200
committerFlavio Percoco <flaper87@gmail.com>2013-09-07 18:44:12 +0200
commit6e869bbbc2e1b2409c2afe4b5b3afcb2dc1e5c19 (patch)
tree3fda01221e14a8d211f63a0630f5f79a24c17a5d
parent3fb5bd23d0e22dcf3223238f528a40b21f42ec66 (diff)
downloadsos-6e869bbbc2e1b2409c2afe4b5b3afcb2dc1e5c19.tar.gz
Split Swift out of openstack's plugin. #184
Signed-off-by: Flavio Percoco <flaper87@gmail.com>
-rw-r--r--sos/plugins/openstack.py19
-rw-r--r--sos/plugins/openstack_swift.py54
2 files changed, 55 insertions, 18 deletions
diff --git a/sos/plugins/openstack.py b/sos/plugins/openstack.py
index 07d17fbb..07e3ff84 100644
--- a/sos/plugins/openstack.py
+++ b/sos/plugins/openstack.py
@@ -78,9 +78,6 @@ class OpenStack(Plugin):
self.add_copy_specs(["/etc/quantum/",
"/var/log/quantum/"])
- # Swift
- self.add_copy_spec("/etc/swift/")
-
def postproc(self):
self.do_file_sub('/etc/keystone/keystone.conf',
r"(admin_password\s*=\s*)(.*)",
@@ -131,12 +128,6 @@ class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin):
'quantum-plugin-ryu',
'quantum-plugin-ryu-agent',
'quantum-server',
- 'swift',
- 'swift-account',
- 'swift-container',
- 'swift-object',
- 'swift-proxy',
- 'swauth',
'python-cinder',
'python-cinderclient',
'python-django-horizon',
@@ -148,9 +139,7 @@ class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin):
'python-novaclient',
'python-novnc',
'python-quantum',
- 'python-quantumclient',
- 'python-swift',
- 'python-swauth')
+ 'python-quantumclient')
def setup(self):
# Nova
@@ -172,12 +161,6 @@ class RedHatOpenStack(OpenStack, RedHatPlugin):
'openstack-dashboard',
'openstack-keystone',
'openstack-quantum',
- 'openstack-swift',
- 'openstack-swift-account',
- 'openstack-swift-container',
- 'openstack-swift-object',
- 'openstack-swift-proxy',
- 'swift',
'python-nova',
'python-glanceclient',
'python-keystoneclient',
diff --git a/sos/plugins/openstack_swift.py b/sos/plugins/openstack_swift.py
new file mode 100644
index 00000000..1b674845
--- /dev/null
+++ b/sos/plugins/openstack_swift.py
@@ -0,0 +1,54 @@
+## Copyright (C) 2013 Red Hat, Inc., Flavio Percoco <fpercoco@redhat.com>
+## Copyright (C) 2012 Rackspace US, Inc., Justin Shepherd <jshepher@rackspace.com>
+## Copyright (C) 2009 Red Hat, Inc., Joey Boggs <jboggs@redhat.com>
+
+### This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+from sos import plugins
+
+
+class OpenStackSwift(plugins.Plugin):
+ """OpenstackSwift related information."""
+ plugin_name = "openstack-swift"
+
+ option_list = [("log", "gathers openstack-swift logs", "slow", False)]
+
+ def setup(self):
+ # Swift
+ self.add_copy_spec("/etc/swift/")
+
+class DebianOpenStackSwift(OpenStackSwift, plugins.DebianPlugin, plugins.UbuntuPlugin):
+ """OpenStackSwift related information for Debian based distributions."""
+
+ packages = ('swift',
+ 'swift-account',
+ 'swift-container',
+ 'swift-object',
+ 'swift-proxy',
+ 'swauth',
+ 'python-swift',
+ 'python-swauth')
+
+
+class RedHatOpenStackSwift(OpenStackSwift, plugins.RedHatPlugin):
+ """OpenStackSwift related information for Red Hat distributions."""
+
+ packages = ('openstack-swift',
+ 'openstack-swift-account',
+ 'openstack-swift-container',
+ 'openstack-swift-object',
+ 'openstack-swift-proxy',
+ 'swift',
+ 'python-swiftclient')