Mercurial > hg > release > thermostat-0.5
view distribution/config/commands/agent.properties @ 915:0f4271d4e334
Change common options implementation.
This patch removes the old CommonCommandOptions class. Common options - dbUrl,
logLevel, username, password - are now automatically added if the "options"
list in command.properties contains "special" option names such as
AUTO_DB_OPTIONS (dbUrl, username, password) and AUTO_LOG_OPTION (logLevel). If
these are present thermostat adds options as requested automatically. Note that
all automatic options are optional. The required property can be
changed/overridden by using a <option-name>.required key in command.properties
and adding <option-name> to the "options" list AFTER the AUTO_* option.
I've also cleaned up the command.properties files and help command output.
command.properties don't need to maintain "thermostat" any longer. Moreover,
help output contains the description of the command as well. Example:
$ ./distribution/target/bin/thermostat help agent
usage: thermostat agent [-d <url> [-u <user> -p <password>]] [-s] [--debug] [-l
<level>]
starts and stops the thermostat agent
thermostat agent
-d,--dbUrl <dbUrl> connect to the given URL
-l,--logLevel <logLevel> sets the log level for this invocation. Possible
values for <level> in decreasing severity are:
SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
and OFF.
-p,--password <password> the password to use for authentication
-s,--saveOnExit save the data on exit
-u,--username <username> the username to use for authentication
-v,--debug launch with debug console enabled
Finally, this should be the last patch required in order to drop the
storage-core dependency of common-core, since it removes the need for
client-cli to depend on the launcher bundle.
It fixes PR1200 too.
Reviewed-by: ebaron, vanaltj
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-January/005118.html
author | Severin Gehwolf <sgehwolf@redhat.com> |
---|---|
date | Fri, 11 Jan 2013 19:23:03 +0100 |
parents | 6815308bb362 |
children |
line wrap: on
line source
bundles = thermostat-agent-core-@project.version@.jar, \ thermostat-web-common-@project.version@.jar, \ thermostat-web-client-@project.version@.jar, \ httpcomponents-core.jar, \ httpcomponents-client.jar, \ gson.jar, \ thermostat-osgi-process-handler-@project.version@.jar, \ thermostat-common-core-@project.version@.jar, \ thermostat-agent-cli-@project.version@.jar, \ thermostat-common-command-@project.version@.jar, \ thermostat-agent-command-@project.version@.jar, \ thermostat-host-cpu-common-@project.version@.jar, \ thermostat-host-cpu-agent-@project.version@.jar, \ thermostat-host-memory-common-@project.version@.jar, \ thermostat-host-memory-agent-@project.version@.jar, \ thermostat-vm-cpu-common-@project.version@.jar, \ thermostat-vm-cpu-agent-@project.version@.jar, \ thermostat-vm-memory-common-@project.version@.jar, \ thermostat-vm-memory-agent-@project.version@.jar, \ thermostat-vm-gc-common-@project.version@.jar, \ thermostat-vm-gc-agent-@project.version@.jar, \ thermostat-vm-classstat-common-@project.version@.jar, \ thermostat-vm-classstat-agent-@project.version@.jar, \ thermostat-vm-heap-analysis-common-@project.version@.jar, \ thermostat-vm-heap-analysis-agent-@project.version@.jar, \ thermostat-killvm-agent-@project.version@.jar, \ thermostat-thread-collector-@project.version@.jar, \ thermostat-thread-harvester-@project.version@.jar, \ thermostat-system-backend-@project.version@.jar, \ thermostat-gc-remote-collector-common-@project.version@.jar, \ thermostat-gc-remote-collector-command-@project.version@.jar, \ thermostat-storage-mongodb-${project.version}.jar, \ thermostat-numa-common-${project.version}.jar, \ thermostat-numa-agent-${project.version}.jar, \ mongo.jar, \ commons-beanutils.jar, \ commons-codec.jar, \ commons-collections.jar, \ commons-logging.jar, \ netty.jar description = starts and stops the thermostat agent usage = agent -d <url> [-u <user> -p <password>] [-s] [--debug] [-l <level>] options = AUTO_LOG_OPTION, AUTO_DB_OPTIONS, saveOnExit, dbUrl, debug saveOnExit.short = s saveOnExit.long = saveOnExit saveOnExit.description = save the data on exit dbUrl.required = true debug.short = v debug.long = debug debug.hasarg = false debug.required = false debug.description = launch with debug console enabled