aboutsummaryrefslogtreecommitdiffstats
path: root/sos/plugins/as7.py
diff options
context:
space:
mode:
Diffstat (limited to 'sos/plugins/as7.py')
-rw-r--r--sos/plugins/as7.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/sos/plugins/as7.py b/sos/plugins/as7.py
index d5abea22..5c7a7b3a 100644
--- a/sos/plugins/as7.py
+++ b/sos/plugins/as7.py
@@ -2,6 +2,7 @@ import os
import re
import zipfile
import urllib2
+import tempfile
try:
import json
@@ -282,6 +283,23 @@ class AS7(Plugin, IndependentPlugin):
self.getOption("logsize"),
sub=(self.__jbossHome, 'JBOSSHOME'))
+ for deployment in find("*", os.path.join(path, "deployments")):
+ self._get_tree_from_deployment(deployment)
+
+
+ def _get_tree_from_deployment(self, path):
+ tmp_dir = tempfile.mkdtemp()
+ try:
+ zf = zipfile.ZipFile(path)
+ zf.extractall(path=tmp_dir)
+ zf.close()
+ tree = DirTree(tmp_dir).as_string()
+ self.addStringAsFile(tree, "%s.tree.txt" % os.path.basename(path))
+ except zipfile.BadZipfile:
+ pass
+ os.rmdir(tmp_dir)
+
+
def setup(self):
## We need to know where JBoss is installed and if we can't find it we