aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-04-14 19:44:07 +0100
committerPep Turro Mauri <pep@redhat.com>2014-06-26 22:19:07 +0200
commit2ba850f752a68f5c18393230d4df7f2f713f3e70 (patch)
tree23baa2ad0d5941fde5e163c9ab04daabf8d46760
parent5572c844e3e8ad63a62364fb72390eccf0398a40 (diff)
downloadsos-2ba850f752a68f5c18393230d4df7f2f713f3e70.tar.gz
Make vendor and ruby version class variables in OpenShift plugin
Allow the vendor path and ruby version to be overridden by subclasses without needing to duplicate code. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/openshift.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sos/plugins/openshift.py b/sos/plugins/openshift.py
index 5dab9f41..e8949209 100644
--- a/sos/plugins/openshift.py
+++ b/sos/plugins/openshift.py
@@ -22,6 +22,9 @@ class Openshift(Plugin, RedHatPlugin):
option_list = [("broker", "Gathers broker specific files", "slow", False),
("node", "Gathers node specific files", "slow", False)]
+ ruby = "ruby193"
+ vendor ="rh"
+
def setup(self):
self.add_copy_specs([
"/etc/openshift-enterprise-version",
@@ -55,7 +58,7 @@ class Openshift(Plugin, RedHatPlugin):
"/var/log/openshift/node",
"/cgroup/*/openshift/",
"/var/log/mcollective.log",
- "/opt/rh/ruby193/root/etc/mcollective/",
+ "/opt/%s/%s/root/etc/mcollective/" % (self.vendor, self.ruby),
"/var/log/openshift-gears-async-start.log",
])