[jboss-jira] [JBoss JIRA] Updated: (AS7-846) Improve usability of jboss-admin.sh for scripting environments

Scott Stark (JIRA) jira-events at lists.jboss.org
Wed May 18 20:11:00 EDT 2011


     [ https://issues.jboss.org/browse/AS7-846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Stark updated AS7-846:
----------------------------

    Git Pull Request: https://github.com/starksm64/jboss-as/commit/3992319a4467f1224e1680b8d4f282db5d01b6d1


> Improve usability of jboss-admin.sh for scripting environments
> --------------------------------------------------------------
>
>                 Key: AS7-846
>                 URL: https://issues.jboss.org/browse/AS7-846
>             Project: Application Server 7
>          Issue Type: Feature Request
>          Components: CLI
>    Affects Versions: 7.0.0.Beta3
>         Environment: sh based environments
>            Reporter: Scott Stark
>            Assignee: Scott Stark
>             Fix For: 7.0.0.CR1
>
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> I want to be able to find out what deployments exist in a server in a 
> scripting environment. There are a couple of issues in the 
> jboss-admin.sh that prevent this from being done. The first is the dump 
> of the environment header:
> =========================================================================
>    JBoss Admin Command-line Interface
>    JBOSS_HOME: 
> /home/git/JBossAS/jboss-as/build/target/jboss-7.0.0.Beta4-SNAPSHOT
>    JAVA: 
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java
>    JAVA_OPTS:
> =========================================================================
> 1. I would like to add a -q/--quiet option that disables the output of 
> this header. It would also suppress the "Connected..." and "Closed..." 
> msgs as all I want to see is the output of the command that is being 
> executed to simplify the script's parsing of the returned information.
> 2. The second is the handling of arguments with strings. The way the 
> launch of the org.jboss.as.cli module is done, arguments to the 
> jboss-admin.sh with quotes around spaces are incorrectly interpretted as 
> multiple arguments. For example, trying to list the deployments using:
> [130](ironmaiden:bin) > ./jboss-admin.sh --connect command='ls deployment'
> Connected to standalone controller at localhost:9999
> extension               path                    subsystem
> deployment              management-interfaces   management
> interface               socket-binding-group
> Closed connection to localhost:9999
> produced just the result of an "ls" command without any arguments. The 
> reason is that the CommandLineMain.main saw 3 arguments instead of 2: 
> {"--connect", "command=ls",  "deployment"}. The "$@" list of arguments 
> to the shell script needs to be hard quoted so that the eval command 
> properly expands the arguments. With this, the previous command now 
> produces the expected listing of the deployment node:
> [131](ironmaiden:bin) > ./jboss-admin.sh --connect command='ls deployment'
> Connected to standalone controller at localhost:9999
> ROOT.war
> Closed connection to localhost:9999
> In these examples I have not yet suppressed the "Connected..." and 
> "Closed..." msgs coming from the CommandLineMain class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list