# HG changeset patch # User Jana Fabrikova # Date 1393316769 -3600 # Node ID 7a0957d2b202d89260f05d59880b27a59f86330f # Parent 7fa8af3d3e7da8e61d04d77ff805867a78d69572 adding the forgotten methods to ThermostatUtilities.java (mentioned in previous commit but unincluded) diff -r 7fa8af3d3e7d -r 7a0957d2b202 src/org/thermostat/qa/framework/ThermostatUtilities.java --- 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 thermostatListVms(String login, String passwd) throws IOException{ + String scriptname="thermostatListVms.sh"; + + createDBLoginTextFile(login, passwd); + + List content = new LinkedList(); + content.add(this.configuration.getThermostatExecutable() + " list-vms < ./scripts/dblogin.txt"); + + return runBashScriptWithContent(scriptname, content); + } + protected List thermostatDumpHeap(String hostId, String vmId, String login, String passwd) throws IOException{ + String scriptname="thermostatDumpHeap.sh"; + + createDBLoginTextFile(login, passwd); + + List content = new LinkedList(); + 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 dblogin = new LinkedList(); + dblogin.add(login); + dblogin.add(passwd); + FileUtils.writeTextFile("./scripts/dblogin.txt", dblogin); + + } + protected void sleep(int ms) { try