From 6e869bbbc2e1b2409c2afe4b5b3afcb2dc1e5c19 Mon Sep 17 00:00:00 2001 From: Flaper Fesp Date: Tue, 27 Aug 2013 14:32:20 +0200 Subject: Split Swift out of openstack's plugin. #184 Signed-off-by: Flavio Percoco --- sos/plugins/openstack.py | 19 +-------------- sos/plugins/openstack_swift.py | 54 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 18 deletions(-) create mode 100644 sos/plugins/openstack_swift.py 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 +## Copyright (C) 2012 Rackspace US, Inc., Justin Shepherd +## Copyright (C) 2009 Red Hat, Inc., Joey Boggs + +### 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') -- cgit