[jboss-jira] [JBoss JIRA] (AS7-2676) CLI parameter prompting
Robert Reimann (JIRA)
jira-events at lists.jboss.org
Thu Jan 12 02:28:21 EST 2012
[ https://issues.jboss.org/browse/AS7-2676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655405#comment-12655405 ]
Robert Reimann commented on AS7-2676:
-------------------------------------
It would be nice if this mechanism could also support non interactive script execution. If the required parameters are provided by properties files or system properties (analogue to the properties support in the domain.sh/standalone.sh scripts) the prompting could be omitted.
In the current domain.sh/standalone.sh scripts ${myParam} is used for string interpolation. Defaults are expressed as ${myParam:myDefault}
An analogue/consistent properties support for the CLI could look like this example:
{code}
./jboss-admin.sh --connect --file=some/location/my-script.cli --properties=/some/location/environment.properties
{code}
environment.properties
{code}
db_url=jdbc:h2:mem:test
db_user=sa
db_password=sa
{code}
my-script.cli
{code}
/subsystem=datasources/data-source=h2:add(connection-url="${db_url}",driver-name=h2,enabled=true, \
jndi-name="java:jboss/datasources/ExampleDS",pool-name="H2DS",user-name="${db_user}",password="${db_password}")
{code}
See the links below for further forum references on this topic:
https://community.jboss.org/message/645317
https://community.jboss.org/thread/173692
> CLI parameter prompting
> -----------------------
>
> Key: AS7-2676
> URL: https://issues.jboss.org/browse/AS7-2676
> Project: Application Server 7
> Issue Type: Feature Request
> Components: CLI
> Affects Versions: 7.1.0.Alpha1
> Reporter: Nicklas Karlsson
> Assignee: Alexey Loubyansky
> Priority: Minor
>
> It could be handy if there was some mechanism for prompting for values (with included default value). That way one could have a master script that could be run for a new AS and you would be prompted for changing parameters (e.g. datsource jdbc urls, transaction timeouts etc)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list