aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlaper Fesp <flaper87@gmail.com>2013-08-27 13:39:06 +0200
committerFlaper Fesp <flaper87@gmail.com>2013-09-07 18:40:46 +0200
commit4ff7416bfd13a0d7065de9d4d219f385397341fd (patch)
treee2164eaedd86cbcca3aac0e425b8f08a39d4f05e
parent3fb5bd23d0e22dcf3223238f528a40b21f42ec66 (diff)
downloadsos-4ff7416bfd13a0d7065de9d4d219f385397341fd.tar.gz
Split Glance out of openstack's plugin. #182
Signed-off-by: Flavio Percoco <flaper87@gmail.com>
-rw-r--r--sos/plugins/openstack.py15
-rw-r--r--sos/plugins/openstack_glance.py54
2 files changed, 54 insertions, 15 deletions
diff --git a/sos/plugins/openstack.py b/sos/plugins/openstack.py
index 07d17fbb..460f8f7d 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/"])
- # Glance
- self.add_cmd_output(
- "glance-manage db_version",
- suggest_filename="glance_db_version")
- self.add_copy_specs(["/etc/glance/",
- "/var/log/glance/"])
-
# Cinder
self.add_cmd_output(
"cinder-manage db version",
@@ -96,11 +89,6 @@ class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin):
'cinder-common',
'cinder-scheduler',
'cinder-volume',
- 'glance',
- 'glance-api',
- 'glance-client',
- 'glance-common',
- 'glance-registry',
'keystone',
'melange',
'nova-api-ec2',
@@ -140,7 +128,6 @@ class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin):
'python-cinder',
'python-cinderclient',
'python-django-horizon',
- 'python-glance',
'python-keystone',
'python-keystoneclient',
'python-melange',
@@ -168,7 +155,6 @@ class RedHatOpenStack(OpenStack, RedHatPlugin):
"""
packages = ('openstack-nova',
- 'openstack-glance',
'openstack-dashboard',
'openstack-keystone',
'openstack-quantum',
@@ -179,7 +165,6 @@ class RedHatOpenStack(OpenStack, RedHatPlugin):
'openstack-swift-proxy',
'swift',
'python-nova',
- 'python-glanceclient',
'python-keystoneclient',
'python-novaclient',
'python-openstackclient',
diff --git a/sos/plugins/openstack_glance.py b/sos/plugins/openstack_glance.py
new file mode 100644
index 00000000..134d23fe
--- /dev/null
+++ b/sos/plugins/openstack_glance.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 OpenStackGlance(plugins.Plugin):
+ """OpenstackGlance related information."""
+ plugin_name = "openstack-glance"
+
+ option_list = [("log", "gathers openstack-glance logs", "slow", False)]
+
+ def setup(self):
+ # Glance
+ self.add_cmd_output(
+ "glance-manage db_version",
+ suggest_filename="glance_db_version")
+ self.add_copy_specs(["/etc/glance/",
+ "/var/log/glance/"])
+
+
+class DebianOpenStackGlance(OpenStackGlance,
+ plugins.DebianPlugin,
+ plugins.UbuntuPlugin):
+ """OpenStackGlance related information for Debian based distributions."""
+
+ packages = ('glance',
+ 'glance-api',
+ 'glance-client',
+ 'glance-common',
+ 'glance-registry',
+ 'python-glance')
+
+
+class RedHatOpenStackGlance(OpenStackGlance, plugins.RedHatPlugin):
+ """OpenStackGlance related information for Red Hat distributions."""
+
+ packages = ('openstack-glance',
+ 'python-glanceclient')