aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-09-07 09:50:31 -0700
committerBryn M. Reeves <bmr@redhat.com>2013-09-07 09:50:31 -0700
commit95f5e04fffbf0883c7f66e273f34f6b83729fe3c (patch)
treed85178ec72f9f650ccc102d7117092e9f3483768
parentef31b383f5543718489c5e852367044c3b278467 (diff)
parent6e869bbbc2e1b2409c2afe4b5b3afcb2dc1e5c19 (diff)
downloadsos-95f5e04fffbf0883c7f66e273f34f6b83729fe3c.tar.gz
Merge pull request #188 from FlaPer87/issue/184
Split Swift out of openstack's plugin. #184
-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 460f8f7d..13922860 100644
--- a/sos/plugins/openstack.py
+++ b/sos/plugins/openstack.py
@@ -71,9 +71,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*)(.*)",
@@ -119,12 +116,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',
@@ -135,9 +126,7 @@ class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin):
'python-novaclient',
'python-novnc',
'python-quantum',
- 'python-quantumclient',
- 'python-swift',
- 'python-swauth')
+ 'python-quantumclient')
def setup(self):
# Nova
@@ -158,12 +147,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-keystoneclient',
'python-novaclient',
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')