Mercurial > hg > release > thermostat-0.5
changeset 791:9fdbdf22d9d4
Remove unneeded backend config.
Since the system-backend-as-OSGi-bundle change these configs weren't used
anywhere. This patch removes references to it.
Ok to push?
Reviewed-by: neugens
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2012-November/004139.html
author | Severin Gehwolf <sgehwolf@redhat.com> |
---|---|
date | Mon, 19 Nov 2012 18:21:20 +0100 |
parents | b063c6afa2d7 |
children | 948d43df4d08 9e42f29a200d |
files | agent/core/src/main/java/com/redhat/thermostat/backend/BackendsProperties.java common/core/src/main/java/com/redhat/thermostat/common/Configuration.java common/core/src/main/java/com/redhat/thermostat/common/config/ConfigUtils.java common/core/src/test/java/com/redhat/thermostat/common/ConfigurationTest.java common/core/src/test/java/com/redhat/thermostat/common/config/ConfigUtilsTest.java distribution/config/agent.properties distribution/config/system/backend.properties distribution/pom.xml distribution/scripts/thermostat-init-layout |
diffstat | 9 files changed, 5 insertions(+), 59 deletions(-) [+] |
line wrap: on
line diff
--- a/agent/core/src/main/java/com/redhat/thermostat/backend/BackendsProperties.java Mon Nov 19 09:49:57 2012 -0500 +++ b/agent/core/src/main/java/com/redhat/thermostat/backend/BackendsProperties.java Mon Nov 19 18:21:20 2012 +0100 @@ -40,11 +40,11 @@ * Properties that any Backend needs to have, at minimum. */ public enum BackendsProperties { - + + // FIXME: Get this info from Bundle metadata and remove this + // enum. DESCRIPTION, VENDOR, - VERSION, - BACKEND_CLASS; + VERSION; - public static final String PROPERTY_FILE = "backend.properties"; }
--- a/common/core/src/main/java/com/redhat/thermostat/common/Configuration.java Mon Nov 19 09:49:57 2012 -0500 +++ b/common/core/src/main/java/com/redhat/thermostat/common/Configuration.java Mon Nov 19 18:21:20 2012 +0100 @@ -75,12 +75,6 @@ return home + File.separator + THERMOSTAT_USER_DIR; } - public File getBackendsBaseDirectory() throws ConfigurationException { - String loc = getThermostatHome() + File.separatorChar + "backends"; - File file = new File(loc); - return file; - } - public File getStorageBaseDirectory() throws ConfigurationException { String loc = getThermostatHome() + File.separatorChar + "storage"; File file = new File(loc); @@ -109,13 +103,6 @@ return logFile; } - public File getBackendPropertyFile(String backendName) throws ConfigurationException { - File backendsConfigDir = getBackendsBaseDirectory(); - File backendConfig = new File(backendsConfigDir, backendName); - backendConfig = new File(backendConfig, "backend.properties"); - return backendConfig; - } - public File getAgentConfigurationFile() throws ConfigurationException { File agent = new File(getThermostatHome(), "agent"); return new File(agent, "agent.properties");
--- a/common/core/src/main/java/com/redhat/thermostat/common/config/ConfigUtils.java Mon Nov 19 09:49:57 2012 -0500 +++ b/common/core/src/main/java/com/redhat/thermostat/common/config/ConfigUtils.java Mon Nov 19 18:21:20 2012 +0100 @@ -95,15 +95,6 @@ return logFile; } - public static File getBackendPropertyFile(String backendName) - throws InvalidConfigurationException - { - File backendsConfigDir = ConfigUtils.getBackendsBaseDirectory(); - File backendConfig = new File(backendsConfigDir, backendName); - backendConfig = new File(backendConfig, "backend.properties"); - return backendConfig; - } - public static File getAgentConfigurationFile() throws InvalidConfigurationException { File agent = new File(getThermostatHome(), "agent");
--- a/common/core/src/test/java/com/redhat/thermostat/common/ConfigurationTest.java Mon Nov 19 09:49:57 2012 -0500 +++ b/common/core/src/test/java/com/redhat/thermostat/common/ConfigurationTest.java Mon Nov 19 18:21:20 2012 +0100 @@ -62,7 +62,6 @@ Assert.assertEquals(path + "agent" + s + "agent.properties", config.getAgentConfigurationFile().getCanonicalPath()); - Assert.assertEquals(path + "backends", config.getBackendsBaseDirectory().getCanonicalPath()); Assert.assertEquals(path + "storage", config.getStorageBaseDirectory().getCanonicalPath()); Assert.assertEquals(path + "storage" + s + "db.properties", config.getStorageConfigurationFile().getCanonicalPath()); @@ -73,8 +72,5 @@ Assert.assertEquals(path + "storage" + s + "run" + s + "db.pid", config.getStoragePidFile().getCanonicalPath()); - Assert.assertEquals(path + "backends" + s + "system" + s + "backend.properties", - config.getBackendPropertyFile("system").getCanonicalPath()); - } }
--- a/common/core/src/test/java/com/redhat/thermostat/common/config/ConfigUtilsTest.java Mon Nov 19 09:49:57 2012 -0500 +++ b/common/core/src/test/java/com/redhat/thermostat/common/config/ConfigUtilsTest.java Mon Nov 19 18:21:20 2012 +0100 @@ -71,10 +71,6 @@ Assert.assertEquals(path + "storage" + s + "logs" + s + "db.log", ConfigUtils.getStorageLogFile().getCanonicalPath()); Assert.assertEquals(path + "storage" + s + "run" + s + "db.pid", - ConfigUtils.getStoragePidFile().getCanonicalPath()); - - Assert.assertEquals(path + "backends" + s + "system" + s + "backend.properties", - ConfigUtils.getBackendPropertyFile("system").getCanonicalPath()); - + ConfigUtils.getStoragePidFile().getCanonicalPath()); } }
--- a/distribution/config/agent.properties Mon Nov 19 09:49:57 2012 -0500 +++ b/distribution/config/agent.properties Mon Nov 19 18:21:20 2012 +0100 @@ -1,9 +1,3 @@ -## Backend Configuration -# This must be a comma separated list naming the backend -# specific backend configurations will be searched under the -# $THERMOSTAT_HOME/backends/[backend_name.properties] -BACKENDS=system - # indicates if this agent will save its data to the database on exit # or rather will purge the db SAVE_ON_EXIT=false
--- a/distribution/config/system/backend.properties Mon Nov 19 09:49:57 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -BACKEND_CLASS=com.redhat.thermostat.backend.system.SystemBackend -DESCRIPTION=gathers basic information from the system -VENDOR=thermostat project -VERSION=0.01
--- a/distribution/pom.xml Mon Nov 19 09:49:57 2012 -0500 +++ b/distribution/pom.xml Mon Nov 19 18:21:20 2012 +0100 @@ -116,14 +116,6 @@ </resource> <resource> <directory>config</directory> - <targetPath>backends</targetPath> - <filtering>true</filtering> - <includes> - <include>system/backend.properties</include> - </includes> - </resource> - <resource> - <directory>config</directory> <targetPath>etc</targetPath> <filtering>true</filtering> <includes>
--- a/distribution/scripts/thermostat-init-layout Mon Nov 19 09:49:57 2012 -0500 +++ b/distribution/scripts/thermostat-init-layout Mon Nov 19 18:21:20 2012 +0100 @@ -44,7 +44,6 @@ THERMOSTAT_STORAGE="${THERMOSTAT_HOME}/storage/db" THERMOSTAT_LOG="${THERMOSTAT_HOME}/storage/logs" THERMOSTAT_PID="${THERMOSTAT_HOME}/storage/run" - THERMOSTAT_BACKEND="${THERMOSTAT_HOME}/backends/system" THERMOSTAT_BIN="${THERMOSTAT_HOME}/bin" THERMOSTAT_AGENT_LOG="${THERMOSTAT_HOME}/agent/logs" THERMOSTAT_AGENT_RUN="${THERMOSTAT_HOME}/agent/run" @@ -67,11 +66,6 @@ mkdir -p ${THERMOSTAT_PID} fi - if [ ! -d "${THERMOSTAT_BACKEND}" ] ; then - echo "creating ${THERMOSTAT_BACKEND}" - mkdir -p ${THERMOSTAT_BACKEND} - fi - if [ ! -e "${THERMOSTAT_BIN}" ] ; then echo "creating ${THERMOSTAT_BIN}" mkdir -p ${THERMOSTAT_BIN}