diff options
author | Flaper Fesp <flaper87@gmail.com> | 2013-08-27 14:21:48 +0200 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2013-09-07 17:55:11 +0100 |
commit | 010df40e287e07a1e5c42a36cf6c5bc29d5cb987 (patch) | |
tree | 959b2f7168a0c4fc3a197b125f96abe712bd2027 | |
parent | 95f5e04fffbf0883c7f66e273f34f6b83729fe3c (diff) | |
download | sos-010df40e287e07a1e5c42a36cf6c5bc29d5cb987.tar.gz |
Split Cinder out of openstack's plugin. #183
Signed-off-by: Flavio Percoco <fpercoco@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/openstack.py | 19 | ||||
-rw-r--r-- | sos/plugins/openstack_cinder.py | 64 |
2 files changed, 65 insertions, 18 deletions
diff --git a/sos/plugins/openstack.py b/sos/plugins/openstack.py index 13922860..21155f94 100644 --- a/sos/plugins/openstack.py +++ b/sos/plugins/openstack.py @@ -56,13 +56,6 @@ class OpenStack(Plugin): self.add_copy_specs(["/etc/nova/", "/var/log/nova/"]) - # Cinder - self.add_cmd_output( - "cinder-manage db version", - suggest_filename="cinder_db_version") - self.add_copy_specs(["/etc/cinder/", - "/var/log/cinder/"]) - # Keystone self.add_copy_specs(["/etc/keystone/", "/var/log/keystone/"]) @@ -81,12 +74,7 @@ class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin): """OpenStack related information for Debian based distributions """ - packages = ('cinder-api', - 'cinder-backup', - 'cinder-common', - 'cinder-scheduler', - 'cinder-volume', - 'keystone', + packages = ('keystone', 'melange', 'nova-api-ec2', 'nova-api-metadata', @@ -116,8 +104,6 @@ class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin): 'quantum-plugin-ryu', 'quantum-plugin-ryu-agent', 'quantum-server', - 'python-cinder', - 'python-cinderclient', 'python-django-horizon', 'python-keystone', 'python-keystoneclient', @@ -132,9 +118,6 @@ class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin): # Nova self.add_copy_spec("/etc/sudoers.d/nova_sudoers") - # Cinder - self.add_copy_spec("/etc/sudoers.d/cinder_sudoers") - # Quantum self.add_copy_spec("/etc/sudoers.d/quantum_sudoers") diff --git a/sos/plugins/openstack_cinder.py b/sos/plugins/openstack_cinder.py new file mode 100644 index 00000000..b3951698 --- /dev/null +++ b/sos/plugins/openstack_cinder.py @@ -0,0 +1,64 @@ +## Copyright (C) 2009 Red Hat, Inc., Joey Boggs <jboggs@redhat.com> +## Copyright (C) 2012 Rackspace US, Inc., Justin Shepherd <jshepher@rackspace.com> +## Copyright (C) 2013 Red Hat, Inc., Flavio Percoco <fpercoco@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 OpenStackCinder(plugins.Plugin): + """OpenstackCinder related information.""" + + plugin_name = "openstack-cinder" + + option_list = [("log", "gathers openstack-cinder logs", "slow", False)] + + def setup(self): + # Cinder + self.add_cmd_output( + "cinder-manage db version", + suggest_filename="cinder_db_version") + self.add_copy_specs(["/etc/cinder/", + "/var/log/cinder/"]) + + +class DebianOpenStackCinder(OpenStackCinder, + plugins.DebianPlugin, + plugins.UbuntuPlugin): + """OpenStackCinder related information for Debian based distributions.""" + + packages = ('cinder-api', + 'cinder-backup', + 'cinder-common', + 'cinder-scheduler', + 'cinder-volume', + 'python-cinder', + 'python-cinderclient') + + def setup(self): + # Cinder + self.add_copy_spec("/etc/sudoers.d/cinder_sudoers") + + +class RedHatOpenStackCinder(OpenStackCinder, plugins.RedHatPlugin): + """OpenStackCinder related information for Red Hat distributions.""" + + packages = ('openstack-cinder', + 'python-cinderclient') + + def setup(self): + # Cinder + self.add_copy_specs(["/etc/sudoers.d/cinder"]) |