Mercurial > repos > melissacline > ucsc_xena_platform
changeset 30:77f5d8cbac77
add functionality to check the version of the current running xena server on the galaxy system
author | Jing Zhu <jzhu@soe.ucsc.edu> |
---|---|
date | Mon, 20 Jul 2015 13:31:33 -0700 |
parents | fc6f93710384 |
children | bb84d3bc5308 |
files | runXena.py xenaAdmin.xml |
diffstat | 2 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/runXena.py Mon Jul 13 14:35:34 2015 -0700 +++ b/runXena.py Mon Jul 20 13:31:33 2015 -0700 @@ -6,7 +6,7 @@ import logging import os import signal -import subprocess +import subprocess, shlex import sys import time import traceback @@ -116,6 +116,15 @@ else: fp.write("Xena VM is not currently running on %s\n" % (hostname)) +elif sys.argv[1] == "version": + # check the current xena status + if xenaIsRunning: + xenaVersionCmd = "java -jar %s --version" % (xena.jarPath()) + args =shlex.split(xenaVersionCmd) + output, error = subprocess.Popen(args, stdout = subprocess.PIPE, stderr= subprocess.PIPE).communicate() + fp.write("The current Xena server version is %s\n" % (output)) + else: + fp.write("Xena Server is not currently running on %s, please start the server first, then you can check the server version.\n" % (hostname)) else: fp.write(("Error: Unexpected command %s" % sys.argv[1]))
--- a/xenaAdmin.xml Mon Jul 13 14:35:34 2015 -0700 +++ b/xenaAdmin.xml Mon Jul 20 13:31:33 2015 -0700 @@ -1,5 +1,5 @@ <tool id="xenaAdmin" name="Xena Administration" version="0.0.2"> - <description>Administer the Galaxy-embedded Xena: start, check status, stop, backup, restore</description> + <description>Administer the Galaxy-embedded Xena: start, check status, stop, check xena version, backup, restore</description> <requirements> <requirement type="package" version="1.0">installXena</requirement> </requirements> @@ -20,6 +20,7 @@ <option value="status">Check Status</option> <option value="start">Start Xena</option> <option value="stop">Stop Xena</option> + <option value="version">Check Current Xena Server Version</option> <option value="backup">Backup the Xena data to an external directory</option> <option value="restore">Restore data to Xena from an external backup directory</option> <option value="delete">Delete a dataset from the local Galaxy-embedded Xena</option> @@ -36,6 +37,7 @@ <when value="status"/> <when value="start"/> <when value="stop"/> + <when value="version"/> </conditional> </inputs> <outputs>