Mercurial > hg > ThermostatQA
changeset 148:7a0957d2b202
adding the forgotten methods to ThermostatUtilities.java (mentioned in previous commit but unincluded)
author | Jana Fabrikova <jfabriko@redhat.com> |
---|---|
date | Tue, 25 Feb 2014 09:26:09 +0100 |
parents | 7fa8af3d3e7d |
children | 44af5584ec59 |
files | src/org/thermostat/qa/framework/ThermostatUtilities.java |
diffstat | 1 files changed, 30 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/org/thermostat/qa/framework/ThermostatUtilities.java Mon Feb 24 17:50:01 2014 +0100 +++ b/src/org/thermostat/qa/framework/ThermostatUtilities.java Tue Feb 25 09:26:09 2014 +0100 @@ -404,7 +404,37 @@ return runBashScriptWithContent(scriptname, content); } + + protected List<String> thermostatListVms(String login, String passwd) throws IOException{ + String scriptname="thermostatListVms.sh"; + + createDBLoginTextFile(login, passwd); + + List<String> content = new LinkedList<String>(); + content.add(this.configuration.getThermostatExecutable() + " list-vms < ./scripts/dblogin.txt"); + + return runBashScriptWithContent(scriptname, content); + } + protected List<String> thermostatDumpHeap(String hostId, String vmId, String login, String passwd) throws IOException{ + String scriptname="thermostatDumpHeap.sh"; + + createDBLoginTextFile(login, passwd); + + List<String> content = new LinkedList<String>(); + content.add(this.configuration.getThermostatExecutable() + " dump-heap -a " + hostId + " -v " + vmId + " < ./scripts/dblogin.txt" ); + + return runBashScriptWithContent(scriptname, content); + } + + protected void createDBLoginTextFile(String login, String passwd){ + List<String> dblogin = new LinkedList<String>(); + dblogin.add(login); + dblogin.add(passwd); + FileUtils.writeTextFile("./scripts/dblogin.txt", dblogin); + + } + protected void sleep(int ms) { try